export interface RetryOptions { retries?: number; delay?: number; backoff?: "fixed" | "exponential" | "linear"; jitter?: boolean; shouldRetry?: (error: unknown, attempt: number) => boolean; onRetry?: (error: unknown, attempt: number) => void; signal?: AbortSignal; } /** * Retries an async function until it succeeds or the retry budget is exhausted. * Supports fixed, linear, or exponential backoff, optional jitter, and * AbortSignal cancellation. * * @template T - Return type of the function * @param {() => Promise} function_ - The async function to invoke * @param {RetryOptions} [options] - Retry configuration * @returns {Promise} Result of the first successful invocation * @example * await retry(() => fetch("/api"), { retries: 5, backoff: "exponential", jitter: true }); */ export declare const retry: (function_: () => Promise, options?: RetryOptions) => Promise;