revite/src/globals.d.ts

28 lines
568 B
TypeScript
Raw Normal View History

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