MCPcopy
hub / github.com/angular/angularfire / zoneWrapFn

Function zoneWrapFn

src/zones.ts:111–122  ·  view source on GitHub ↗
(
  it: (...args: any[]) => any,
  taskDone: VoidFunction | undefined,
  injector: EnvironmentInjector,
)

Source from the content-addressed store, hash-verified

109}
110
111const zoneWrapFn = (
112 it: (...args: any[]) => any,
113 taskDone: VoidFunction | undefined,
114 injector: EnvironmentInjector,
115) => {
116 return (...args: any[]) => {
117 if (taskDone) {
118 setTimeout(taskDone, 0);
119 }
120 return runInInjectionContext(injector, () => run(() => it.apply(this, args)));
121 };
122};
123
124export const ɵzoneWrap = <T= unknown>(it: T, blockUntilFirst: boolean, logLevel?: LogLevel): T => {
125 logLevel ||= blockUntilFirst ? LogLevel.WARN : LogLevel.VERBOSE;

Callers 1

ɵzoneWrapFunction · 0.85

Calls 1

runFunction · 0.85

Tested by

no test coverage detected