feat(internal): Support globalThis in modern environments (#4628)

pull/4654/head
Игорь Фролов 4 years ago committed by GitHub
parent 89f30dae36
commit 085897c799
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,3 +1,7 @@
declare const global: any;
export const globals = (typeof window !== 'undefined' ? window : global) as unknown as typeof globalThis;
export const globals = (typeof window !== 'undefined'
? window
: typeof globalThis !== 'undefined'
? globalThis
: global) as unknown as typeof globalThis;

Loading…
Cancel
Save