Use globalThis to declare global variables

This commit is contained in:
redphx
2024-04-23 18:23:41 +07:00
parent c0efaf3e34
commit 9a76731c69
4 changed files with 13 additions and 17 deletions

14
src/types/index.d.ts vendored
View File

@@ -51,11 +51,11 @@ type BxStates = {
type DualEnum = {[index: string]: number} & {[index: number]: string};
declare const window: Window & typeof globalThis;
declare const AppInterface: any;
declare const STREAM_WEBRTC: RTCPeerConnection;
declare let States: BxStates;
declare const NATIVE_FETCH: typeof window.fetch;
declare const SCRIPT_VERSION: string;
declare const SCRIPT_HOME: string;
declare var SCRIPT_VERSION: string;
declare var window: Window & typeof globalThis;
declare var AppInterface: any;
declare var STREAM_WEBRTC: RTCPeerConnection;
declare var States: BxStates;
declare var NATIVE_FETCH: typeof window.fetch;
declare var SCRIPT_HOME: string;
declare var LOCALE: number;