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

Method wrap

packages/zone.js/lib/zone-impl.ts:878–887  ·  view source on GitHub ↗
(callback: T, source: string)

Source from the content-addressed store, hash-verified

876 }
877
878 public wrap<T extends Function>(callback: T, source: string): T {
879 if (typeof callback !== 'function') {
880 throw new Error('Expecting function got: ' + callback);
881 }
882 const _callback = this._zoneDelegate.intercept(this, callback, source);
883 const zone: ZoneImpl = this;
884 return function (this: unknown) {
885 return zone.runGuarded(_callback, this, <any>arguments, source);
886 } as any as T;
887 }
888
889 public run(callback: Function, applyThis?: any, applyArgs?: any[], source?: string): any;
890 public run<T>(

Callers

nothing calls this directly

Calls 2

interceptMethod · 0.65
runGuardedMethod · 0.65

Tested by

no test coverage detected