Feature/about screen add option to check for and trigger updates (#485)
* [VersionMapping] Require server version "r1436" for preview * Move ts util types to new type file * Add buttons for updating server and webUI
This commit is contained in:
25
src/UtilTypes.d.ts
vendored
Normal file
25
src/UtilTypes.d.ts
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* Copyright (C) Contributors to the Suwayomi project
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
type ExtractByKeyValue<T, Key extends keyof T, Value extends T[Key]> = T extends
|
||||
| Record<Key, Value>
|
||||
| Partial<Record<Key, Value>>
|
||||
? T
|
||||
: never;
|
||||
|
||||
type RecursivePartial<T> = {
|
||||
[P in keyof T]?: T[P] extends (infer U)[]
|
||||
? RecursivePartial<U>[]
|
||||
: T[P] extends object | undefined
|
||||
? RecursivePartial<T[P]>
|
||||
: T[P];
|
||||
};
|
||||
|
||||
type OptionalProperty<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
||||
|
||||
type PropertiesNever<T> = { [key in keyof T]?: never };
|
||||
Reference in New Issue
Block a user