pollTillDefinedAndReturnIntervalId
Callable
Type parameters
- T
Parameters
func: AsyncFunction<T, unknown>
The function to call.
interval: number
The interval in milliseconds.
Returns [Promise<Exclude<T, undefined>>, Timer]
The function to call.
The interval in milliseconds.
Repeatedly calls an async function with a given interval until the result of the function is defined (not undefined or null), or until a timeout is reached. It returns promise and intervalId.