revite/src/types/native.d.ts

31 lines
644 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;
2022-05-10 12:26:57 +01:00
minimiseToTray: boolean;
2021-08-03 20:04:46 +01:00
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-05 14:47:00 +01:00
set(key: keyof NativeConfig, value: unknown);
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
};
}
2021-08-05 14:47:00 +01:00
declare const Fragment = preact.Fragment;