Skip to content

@lelantos-org/sdk / internal / retry

Function: retry() ​

ts
function retry<T>(
   fn, 
   policy, 
   rand?
): Promise<T>;

Defined in: @lelantos-org/sdk/dist/core/async.d.ts:42

Exponential backoff with jitter. fn receives the 0-based attempt number.

Type Parameters ​

Type Parameter
T

Parameters ​

ParameterType
fn(attempt) => Promise<T>
policyRetryPolicy
rand?() => number

Returns ​

Promise<T>