fix(core): Remove static dependency from @angular/core to @angular/compiler (#26734)
PR Close #26734
This commit is contained in:

committed by
Matias Niemelä

parent
5d740785a9
commit
d042c4afe0
@ -233,3 +233,19 @@ export interface Console {
|
||||
log(message: string): void;
|
||||
warn(message: string): void;
|
||||
}
|
||||
|
||||
|
||||
declare var WorkerGlobalScope: any;
|
||||
// CommonJS / Node have global context exposed as "global" variable.
|
||||
// We don't want to include the whole node.d.ts this this compilation unit so we'll just fake
|
||||
// the global "global" var for now.
|
||||
declare var global: any;
|
||||
const __window = typeof window !== 'undefined' && window;
|
||||
const __self = typeof self !== 'undefined' && typeof WorkerGlobalScope !== 'undefined' &&
|
||||
self instanceof WorkerGlobalScope && self;
|
||||
const __global = typeof global !== 'undefined' && global;
|
||||
|
||||
// Check __global first, because in Node tests both __global and __window may be defined and _global
|
||||
// should be __global in that case.
|
||||
const _global: {[name: string]: any} = __global || __window || __self;
|
||||
export {_global as global};
|
||||
|
Reference in New Issue
Block a user