diff --git a/packages/zone.js/lib/zone-global.d.ts b/packages/zone.js/lib/zone-global.d.ts new file mode 100644 index 0000000000..9576a14597 --- /dev/null +++ b/packages/zone.js/lib/zone-global.d.ts @@ -0,0 +1,13 @@ +/** + * @license + * Copyright Google LLC All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +// CommonJS / Node have global context exposed as "global" variable. +// This code should run in a Browser, so we don't want to include the whole node.d.ts +// typings for this compilation unit. +// We'll just fake the global "global" var for now. +declare var global: NodeJS.Global; diff --git a/packages/zone.js/lib/zone.ts b/packages/zone.js/lib/zone.ts index 86b0949bf3..0c52fec4ad 100644 --- a/packages/zone.js/lib/zone.ts +++ b/packages/zone.js/lib/zone.ts @@ -675,12 +675,6 @@ type AmbientZone = Zone; /** @internal */ type AmbientZoneDelegate = ZoneDelegate; -// CommonJS / Node have global context exposed as "global" variable. -// This code should run in a Browser, so we don't want to include the whole node.d.ts -// typings for this compilation unit. -// We'll just fake the global "global" var for now. -declare var global: NodeJS.Global; - const Zone: ZoneType = (function(global: any) { const performance: {mark(name: string): void; measure(name: string, label: string): void;} = global['performance'];