import type { RetryStrategy } from "./types.js"; /** * Retry options for network requests */ export interface RetryOptions { /** * Number of retry attempts * @default 3 */ retries?: number; /** * Delay between retries in milliseconds * @default 1000 */ delay?: number; /** * Whether to use exponential backoff * @default true */ exponentialBackoff?: boolean; } /** * Enhanced retry function with timeout and custom callbacks */ export declare function retryWithStrategy(fn: (signal?: AbortSignal) => Promise, strategy?: RetryStrategy, onRetry?: (attempt: number) => void, onError?: (error: Error) => void): Promise; /** * Retry a function with exponential backoff (legacy function for backwards compatibility) * Useful for network requests that may fail due to transient issues * * @param fn - The async function to retry * @param retries - Number of retry attempts (default: 3) * @param options - Additional retry options * @returns The result of the function * @throws The last error if all retries fail */ export declare function retry(fn: () => Promise, retries?: number, options?: Omit): Promise; //# sourceMappingURL=retry.d.ts.map