refactor(zone.js): export Zone initialization function instead of invoking it as an IIFE (#53443)

This removes the top-level side effects from this file. Indenting is left as-is to minimize changes.

PR Close #53443
This commit is contained in:
Doug Parker 2023-12-07 17:28:13 -08:00 committed by Alex Rickabaugh
parent 17c59eb962
commit 6c7e1e61c6

View file

@ -676,7 +676,7 @@ export type AmbientZone = Zone;
// Initialize global `Zone` constant.
const global = globalThis as any;
(function() {
export function initZone(): ZoneType {
const performance: {mark(name: string): void; measure(name: string, label: string): void;} =
global['performance'];
function mark(name: string) {
@ -1448,7 +1448,5 @@ let _numberOfNestedTaskFrames = 0;
function noop() {}
performanceMeasure('Zone', 'Zone');
return global['Zone'] = ZoneImpl;
})();
export {};
return ZoneImpl;
}