/** * Retry Executor with Exponential Backoff * * Handles retries with exponential backoff and jitter. */ import type { RetryConfig } from './types.js'; export declare class RetryExecutor { private config; constructor(config: RetryConfig); /** * Execute a function with retry logic. * * @param fn - The function to execute * @param isRetryable - Function to determine if an error is retryable * @returns The result of fn * @throws The last error if all retries fail */ execute(fn: () => Promise, isRetryable: (error: Error) => boolean): Promise; /** * Execute with a custom abort signal. */ executeWithAbort(fn: () => Promise, isRetryable: (error: Error) => boolean, signal: AbortSignal): Promise; /** * Calculate delay with exponential backoff and jitter. */ private calculateDelay; /** * Sleep for a given duration. */ private sleep; /** * Sleep with abort signal support. */ private sleepWithAbort; /** * Get the configuration. */ getConfig(): RetryConfig; } /** * Create a retry executor with default configuration. */ export declare function createRetryExecutor(config?: Partial): RetryExecutor; /** * Simple retry wrapper for common use cases. */ export declare function withRetry(fn: () => Promise, options?: { maxRetries?: number; baseDelayMs?: number; isRetryable?: (error: Error) => boolean; }): Promise; //# sourceMappingURL=retry-executor.d.ts.map