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

Function flush

packages/core/test/resource/resource_spec.ts:58–68  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

56 }
57
58 async flush(): Promise<void> {
59 const allPending = Array.from(this.pending.values()).map((pending) => pending.promise);
60
61 for (const [req, {resolve}] of this.pending) {
62 resolve(this.prepareResponse(req));
63 }
64 this.pending.clear();
65
66 await Promise.all(allPending);
67 await flushMicrotasks();
68 }
69
70 protected abstract prepareResponse(request: T): R;
71}

Callers

nothing calls this directly

Calls 7

mapMethod · 0.80
valuesMethod · 0.80
flushMicrotasksFunction · 0.70
resolveFunction · 0.50
prepareResponseMethod · 0.45
clearMethod · 0.45
allMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…