Files
vscode-debug-visualizer/data-extraction/src/getGlobal.ts
Henning Dieterichs a9656e1e12 Update
2023-09-07 15:00:50 +02:00

11 lines
259 B
TypeScript

export function getGlobal(): any {
if (typeof globalThis === "object") {
return globalThis;
} else if (typeof global === "object") {
return global;
} else if (typeof window === "object") {
return window;
}
throw new Error("No global available");
}