Skip to content

Commit a4206f2

Browse files
committed
Runtime: Simplify find-global.ts to just globalThis
1 parent 809487c commit a4206f2

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

Runtime/src/find-global.ts

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1 @@
1-
interface GlobalVariable {}
2-
declare const global: GlobalVariable;
3-
4-
export let globalVariable: any;
5-
if (typeof globalThis !== "undefined") {
6-
globalVariable = globalThis;
7-
} else if (typeof window !== "undefined") {
8-
globalVariable = window;
9-
} else if (typeof global !== "undefined") {
10-
globalVariable = global;
11-
} else if (typeof self !== "undefined") {
12-
globalVariable = self;
13-
}
1+
export const globalVariable: any = globalThis;

0 commit comments

Comments
 (0)