MCPcopy Index your code
hub / github.com/refined-github/refined-github / waitFor

Function waitFor

source/helpers/wait-for.ts:3–8  ·  view source on GitHub ↗
(condition: () => any)

Source from the content-addressed store, hash-verified

1import delay from './delay.js';
2
3export default async function waitFor(condition: () => any): Promise<void> {
4 while (!condition()) {
5 // eslint-disable-next-line no-await-in-loop
6 await delay(10);
7 }
8}

Callers 1

Calls 1

delayFunction · 0.85

Tested by

no test coverage detected