retry
retry<
E>(options): <A>(data) =>TaskResult<E,A>
Defined in: Core/TaskResult.ts:130
Re-runs a TaskResult on Err with configurable attempts, backoff, and retry condition.
Type Parameters
Section titled “Type Parameters”E
Parameters
Section titled “Parameters”options
Section titled “options”attempts
Section titled “attempts”number
Total number of attempts (1 = no retry, 3 = up to 3 tries)
backoff?
Section titled “backoff?”number | (attempt) => number
Fixed delay in ms, or a function (attempt) => ms for computed delay
(error) => boolean
Only retry when this returns true; defaults to always retry on Err
Returns
Section titled “Returns”<
A>(data):TaskResult<E,A>
Type Parameters
Section titled “Type Parameters”A
Parameters
Section titled “Parameters”TaskResult<E, A>
Returns
Section titled “Returns”TaskResult<E, A>