The resolved return type.
The function to retry.
Called after each failure. If it returns false, retries stop and null is returned.
The result of f, or null if retries were forfeited.
f runs immediately with zero failures. After each rejection, doDelay receives
the incremented failure count and latest error. Only an explicit false forfeits.
Custom void-returning delays infer a nonnullable result. Boolean-returning delays,
including every createExponentialBackoffDelay result, infer T | null.
Retries an async function until it succeeds, using a delay function between attempts.
The resolved return type.
The function to retry.
Called after each failure. If it returns false, retries stop and null is returned.
The result of f, or null if retries were forfeited.
f runs immediately with zero failures. After each rejection, doDelay receives
the incremented failure count and latest error. Only an explicit false forfeits.
Custom void-returning delays infer a nonnullable result. Boolean-returning delays,
including every createExponentialBackoffDelay result, infer T | null.
Retries an async function until it succeeds, using a delay function between attempts.