pollUntil
pollUntil<
A>(options): <E>(task) =>TaskResult<E,A>
Defined in: Core/TaskResult.ts:210
Polls a TaskResult repeatedly until the success value satisfies a predicate.
Stops immediately and returns Err if the task fails.
An AbortSignal passed at the call site is forwarded to each attempt; the loop
also checks the signal before starting a new poll so cancellation stops promptly.
delay accepts a fixed number of milliseconds or a function (attempt) => ms
for a computed delay — useful for starting fast and slowing down over time.
Type Parameters
Section titled “Type Parameters”A
Parameters
Section titled “Parameters”options
Section titled “options”delay?
Section titled “delay?”number | (attempt) => number
(a) => boolean
Returns
Section titled “Returns”<
E>(task):TaskResult<E,A>
Type Parameters
Section titled “Type Parameters”E
Parameters
Section titled “Parameters”TaskResult<E, A>
Returns
Section titled “Returns”TaskResult<E, A>