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

Function waitFor

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

Source from the content-addressed store, hash-verified

447});
448
449async function waitFor(fn: () => boolean): Promise<void> {
450 while (!fn()) {
451 await timeout(1);
452 }
453}
454
455function flushMicrotasks(): Promise<void> {
456 return new Promise((resolve) => setTimeout(resolve, 0));

Callers 1

Calls 2

timeoutFunction · 0.90
fnFunction · 0.50

Tested by

no test coverage detected