revite/src/globals.d.ts

30 lines
615 B
TypeScript
Raw Normal View History

2021-07-31 17:39:15 -04:00
type Build = "stable" | "nightly" | "dev";
type NativeConfig = {
frame: boolean;
build: Build;
2021-08-03 15:04:46 -04:00
discordRPC: boolean;
hardwareAcceleration: boolean;
2021-07-31 17:39:15 -04:00
};
declare interface Window {
isNative?: boolean;
2021-08-01 09:22:08 -04:00
nativeVersion: string;
2021-07-31 17:39:15 -04:00
native: {
2021-08-01 09:22:08 -04:00
min();
max();
2021-07-31 17:39:15 -04:00
close();
reload();
2021-08-01 09:22:08 -04:00
relaunch();
2021-07-31 17:39:15 -04:00
getConfig(): NativeConfig;
2021-08-05 09:47:00 -04:00
set(key: keyof NativeConfig, value: unknown);
2021-08-01 09:22:08 -04:00
getAutoStart(): Promise<boolean>;
enableAutoStart(): Promise<void>;
disableAutoStart(): Promise<void>;
2021-07-31 17:39:15 -04:00
};
}
2021-08-05 09:47:00 -04:00
declare const Fragment = preact.Fragment;