export type RetryOptions = { maxRetries?: number; shouldRetry?: (error: unknown, attempt: number) => boolean; }; /** * Checks if an error is a client error (4xx HTTP status code) that should not be retried. * Client errors indicate issues with the request itself (bad input, unauthorized, not found, etc.) * and retrying won't help. * * @param error - The error to check * @returns true if the error should be retried, false if it's a client error */ export declare function isRetryableError(error: unknown): boolean; /** * Wraps an async function with automatic retry logic using exponential backoff. * * By default, retries are performed for server errors (5xx) and network errors, * but not for client errors (4xx) which indicate issues with the request itself. * * @param fn - The async function to retry * @param options - Retry options * @returns The result of the function */ export declare function withRetry(fn: () => Promise, options?: RetryOptions): Promise; //# sourceMappingURL=retry.d.ts.map