MCPcopy Index your code
hub / github.com/angular/angular / __load_patch

Method __load_patch

packages/zone.js/lib/zone-impl.ts:816–831  ·  view source on GitHub ↗
(name: string, fn: PatchFn, ignoreDuplicate = false)

Source from the content-addressed store, hash-verified

814 }
815
816 static __load_patch(name: string, fn: PatchFn, ignoreDuplicate = false): void {
817 if (Object.hasOwn(patches, name)) {
818 // `checkDuplicate` option is defined from global variable
819 // so it works for all modules.
820 // `ignoreDuplicate` can work for the specified module
821 const checkDuplicate = global[__symbol__('forceDuplicateZoneCheck')] === true;
822 if (!ignoreDuplicate && checkDuplicate) {
823 throw Error('Already loaded patch: ' + name);
824 }
825 } else if (!global['__Zone_disable_' + name]) {
826 const perfName = 'Zone:' + name;
827 mark(perfName);
828 patches[name] = fn(global, ZoneImpl, _api);
829 performanceMeasure(perfName, perfName);
830 }
831 }
832
833 public get parent(): AmbientZone | null {
834 return this._parent;

Callers

nothing calls this directly

Calls 5

__symbol__Function · 0.85
ErrorInterface · 0.85
performanceMeasureFunction · 0.85
markFunction · 0.70
fnFunction · 0.50

Tested by

no test coverage detected