export interface BackoffConfig { baseDelay: number; maxDelay: number; multiplier: number; jitter: boolean; maxAttempts: number; } export interface RetryOptions { strategy: "exponential" | "linear" | "custom"; config: BackoffConfig; onRetry?: (attempt: number, delay: number) => void; } /** * Exponential backoff with optional jitter to prevent thundering herd */ export declare function exponentialBackoff(attempt: number, config?: Partial): number; /** * Linear backoff with consistent increments */ export declare function linearBackoff(attempt: number, increment: number): number; /** * Custom backoff strategy with user-defined function */ export declare function customStrategy(attempt: number, strategy: (attempt: number, config: BackoffConfig) => number, config?: Partial): number; /** * Create a delay function based on retry options */ export declare function createDelayFunction(options: RetryOptions): (attempt: number) => number; /** * Execute an operation with retry logic */ export declare function executeWithRetry(operation: () => Promise, options: RetryOptions): Promise;