Skip to content

Function: retry() ​

retry<T>(times, callback, sleepMilliseconds?): Promise<T>

Defined in: src/runtime.ts:149

Execute a callback with retry logic

Type Parameters ​

T ​

T

Parameters ​

times ​

number

The number of times to retry

callback ​

(attempt) => T | Promise<T>

The callback to execute

sleepMilliseconds? ​

number = 0

The amount of time to wait between retries

Returns ​

Promise<T>

The result of the callback

Throws ​

If all attempts fail

Documentation of 1.0.13 , built from cf61d3b on 1.0.13 by pipeline #2985011498 on 2026-10-21.