MCPcopy Create free account
hub / github.com/angular/angular / wrap

Method wrap

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

interceptMethod · 0.65
runGuardedMethod · 0.65

Tested by

no test coverage detected