Skip to content

Commit

Permalink
Ignore type completely.
Browse files Browse the repository at this point in the history
  • Loading branch information
ghengeveld committed Oct 19, 2020
1 parent d9857b9 commit 2406275
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/react-async/src/globalScope.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ declare type GlobalScope = {
* This file is excluded from coverage reporting because these globals are environment-specific so we can't test them all.
*/
const globalScope = (() => {
const glbl = global as any
if (typeof self === "object" && self.self === self) return self
if (typeof global === "object" && global.global === global) return global
if (typeof global === "object" && global["GLOBAL"] === global) return global
if (typeof glbl === "object" && glbl.global === glbl) return glbl
if (typeof glbl === "object" && glbl.GLOBAL === glbl) return glbl
return {} // fallback that relies on imported modules to be singletons
})() as GlobalScope

Expand Down

0 comments on commit 2406275

Please sign in to comment.