MCPcopy
hub / github.com/angular/angular / waitFor

Function waitFor

packages/core/rxjs-interop/test/rx_resource_spec.ts:407–411  ·  view source on GitHub ↗
(fn: () => boolean)

Source from the content-addressed store, hash-verified

405});
406
407async function waitFor(fn: () => boolean): Promise<void> {
408 while (!fn()) {
409 await timeout(1);
410 }
411}
412
413function flushMicrotasks(): Promise<void> {
414 return new Promise((resolve) => setTimeout(resolve, 0));

Callers 1

Calls 2

timeoutFunction · 0.90
fnFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…