Create better-xcloud.lite.user.js

This commit is contained in:
redphx
2024-09-30 17:11:05 +07:00
parent 109cd63a7b
commit bd58355ef5
17 changed files with 276 additions and 92 deletions

View File

@@ -1,7 +1,9 @@
type BuildVariant = 'full' | 'lite';
// Get type of an array's element
type ArrayElement<ArrayType extends readonly unknown[]> = ArrayType extends readonly (infer ElementType)[] ? ElementType : never;
type PartialRecord<K extends keyof any, T> = Partial<Record<K, T>>
type PartialRecord<K extends keyof any, T> = Partial<Record<K, T>>;
interface Window {
AppInterface: any;

View File

@@ -24,6 +24,7 @@ export type SettingDefinition = {
suggest: PartialRecord<SuggestedSettingCategory, any>,
ready: (setting: SettingDefinition) => void;
type: SettingElementType,
requiredVariants: BuildVariant | Array<BuildVariant>;
// migrate?: (this: Preferences, savedPrefs: any, value: any) => void;
}> & (
{} | {