/** * Options for retry behavior */ export interface RetryOptions { /** Maximum number of retry attempts (default: 3) */ maxRetries?: number; /** Initial delay in milliseconds before first retry (default: 1000) */ initialDelayMs?: number; /** Multiplier for exponential backoff (default: 2) */ backoffMultiplier?: number; /** Maximum delay in milliseconds (default: 30000) */ maxDelayMs?: number; /** Optional callback called before each retry */ onRetry?: (attempt: number, error: Error, nextDelayMs: number) => void; } /** * Executes an async function with retry logic and exponential backoff. * * @param fn - The async function to execute * @param options - Retry configuration options * @returns The result of the function if successful * @throws The last error encountered after all retries are exhausted */ export declare function withRetry(fn: () => Promise, options?: RetryOptions): Promise;