retry<Fn extends (...args: any[]) => any>(f: Fn,opts?: Config,): (...args: Parameters<Fn>) => Promise<ReturnType<Fn>>
Exponentially retry a function until it succeeds or the maximum number of attempts is reached.
Each delay will be calculated as delay * 2 ** c
, where c
is the current attempt number, and an applied jitter.