You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
bazarr/frontend/src/@types/basic.d.ts

35 lines
636 B

// Sonarr
type SonarrSeriesType = "Standard" | "Daily" | "Anime";
type PythonBoolean = "True" | "False";
type FileTree = {
children: boolean;
path: string;
name: string;
};
type StorageType = string | null;
interface AsyncState<T> {
updating: boolean;
error?: Error;
data: Readonly<T>;
}
type AsyncPayload<T> = T extends AsyncState<infer D> ? D : never;
type SelectorOption<PAYLOAD> = {
label: string;
value: PAYLOAD;
};
type SelectorValueType<T, M extends boolean> = M extends true
? ReadonlyArray<T>
: Nullable<T>;
type SimpleStateType<T> = [
T,
((item: T) => void) | ((fn: (item: T) => T) => void)
];