fix(zone.js): don't rely on global node typings outside of node/ directory (#31783)
PR Close #31783
This commit is contained in:

committed by
Andrew Kushnir

parent
3479fddf68
commit
5c9a8961da
@ -675,6 +675,12 @@ 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'];
|
||||
|
Reference in New Issue
Block a user