/** Numeric retry tunables — all optional with sensible defaults. */
export type RetryConfig = {
    attempts?: number;
    minDelayMs?: number;
    maxDelayMs?: number;
    jitter?: number;
};
/** Information passed to the `onRetry` callback after each failed attempt. */
export type RetryInfo = {
    attempt: number;
    maxAttempts: number;
    delayMs: number;
    err: unknown;
    label?: string;
};
/** Full retry options including predicates and callbacks. */
export type RetryOptions = RetryConfig & {
    label?: string;
    shouldRetry?: (err: unknown, attempt: number) => boolean;
    retryAfterMs?: (err: unknown) => number | undefined;
    onRetry?: (info: RetryInfo) => void;
};
/** Merge user overrides onto default retry config, clamping values to sane ranges. */
export declare function resolveRetryConfig(defaults?: Required<RetryConfig>, overrides?: RetryConfig): Required<RetryConfig>;
/**
 * Retry an async function with exponential backoff.
 *
 * Supports two call styles:
 * 1. Simple: `retryAsync(fn, attempts, initialDelayMs)` — plain exponential doubling
 * 2. Full: `retryAsync(fn, options)` — configurable jitter, shouldRetry, Retry-After, etc.
 *
 * @throws The last error thrown by `fn` after all attempts are exhausted.
 */
export declare function retryAsync<T>(fn: () => Promise<T>, attemptsOrOptions?: number | RetryOptions, initialDelayMs?: number): Promise<T>;
