Function: waitFor()
waitFor<
T>(callback,options?):Promise<T>
Defined in: wait-for.ts:14
Waits for a callback to succeed without throwing an error.
Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type | Description |
|---|---|---|
callback | () => T | Function to execute repeatedly until it succeeds |
options? | WaitForOptions | Wait options (timeout, interval, onTimeout) |
Returns
Promise<T>
Promise resolving to the callback's return value
Throws
If the callback keeps failing after the timeout period