This repository was archived by the owner on Feb 26, 2024. It is now read-only.
File tree 1 file changed +3
-4
lines changed
1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 13
13
14
14
// Hack since TypeScript isn't compiling this for a worker.
15
15
declare const WorkerGlobalScope : any ;
16
- declare const window : any ;
17
16
18
17
export const zoneSymbol : ( name : string ) => string = ( n ) => `__zone_symbol__${ n } ` ;
19
- const _global = typeof window === 'object' && window || typeof self === 'object' && self || global ;
18
+ const _global : any = typeof window === 'object' && window || typeof self === 'object' && self || global ;
20
19
21
20
export function bindArguments ( args : any [ ] , source : string ) : any [ ] {
22
21
for ( let i = args . length - 1 ; i >= 0 ; i -- ) {
@@ -50,12 +49,12 @@ export const isNode: boolean =
50
49
{ } . toString . call ( process ) === '[object process]' ) ;
51
50
52
51
export const isBrowser : boolean =
53
- ! isNode && ! isWebWorker && ! ! ( typeof window !== 'undefined' && window [ 'HTMLElement' ] ) ;
52
+ ! isNode && ! isWebWorker && ! ! ( typeof window !== 'undefined' && ( window as any ) [ 'HTMLElement' ] ) ;
54
53
55
54
// we are in electron of nw, so we are both browser and nodejs
56
55
export const isMix : boolean = typeof process !== 'undefined' &&
57
56
{ } . toString . call ( process ) === '[object process]' && ! isWebWorker &&
58
- ! ! ( typeof window !== 'undefined' && window [ 'HTMLElement' ] ) ;
57
+ ! ! ( typeof window !== 'undefined' && ( window as any ) [ 'HTMLElement' ] ) ;
59
58
60
59
export function patchProperty ( obj : any , prop : string ) {
61
60
const desc = Object . getOwnPropertyDescriptor ( obj , prop ) || { enumerable : true , configurable : true } ;
You can’t perform that action at this time.
0 commit comments