Skip to content
Buy me a coffee

waitFor

waitFor(condition, options): Promise<void>

Defined in: src/batch.ts:83

Polls condition every interval until it returns true. Rejects with TimeoutRejectedError after timeout, and with the error if condition throws (wrap it in .catch(() => false) to treat errors as “not yet”).

(signal) => MaybePromise<boolean>

WaitForOptions

Promise<void>