export type RetryOnFetchErrorParams<T> = {
    /**
     * The delay between retries in milliseconds.
     */
    delay?: number;
    /**
     * The function to call.
     */
    fn: () => Promise<T>;
    /**
     * The maximum number of retries.
     *
     * When set to 0, the function will be called only once and is
     * therefore equivalent to calling the function directly.
     */
    maxRetries?: number;
    /**
     * Called before each retry, after a retryable failure. Intended for
     * logging and must not throw.
     */
    onRetry?: (args: {
        error: unknown;
    }) => void;
};
/**
 * Retries `fn` only when it rejects with the `TypeError` that `fetch` throws on
 * a transport-level network failure (the connection drops before the server
 * responds). Per the WHATWG Fetch standard every engine rejects with a
 * `TypeError` here and only the message differs.
 * Everything that is not a `TypeError` is rethrown immediately and never
 * retried.
 *
 * @notInstrumented
 */
export declare const retryOnFetchError: <T>({ delay, fn, maxRetries, onRetry, }: RetryOnFetchErrorParams<T>) => Promise<T>;
//# sourceMappingURL=retryOnFetchError.d.ts.map