export interface BackoffOptions { /** Initial delay in ms. Doubles each attempt up to capMs. Default 1000. */ baseMs?: number; /** Maximum delay in ms before jitter. Default 60_000. */ capMs?: number; /** Multiplicative jitter range in [0, 1]. The actual delay is sampled * uniformly from `[exp * (1 - jitter), exp * (1 + jitter)]`. Set to 0 * for deterministic delays (testing). Default 0.5. */ jitter?: number; /** Pluggable RNG for deterministic tests. Defaults to Math.random. */ random?: () => number; } export declare class Backoff { private attempt; private readonly baseMs; private readonly capMs; private readonly jitter; private readonly random; constructor(opts?: BackoffOptions); /** * Compute the next delay in ms and increment the attempt counter. * * - First call: ~baseMs (jittered) * - Each call doubles the unjittered exponent until it hits capMs * - Then every subsequent call returns ~capMs (jittered) * * Returns a non-negative integer. */ nextDelayMs(): number; /** Reset attempt counter — call after a successful operation. */ reset(): void; /** Diagnostic: current attempt count without bumping. */ currentAttempt(): number; } //# sourceMappingURL=backoff.d.ts.map