import type { AxiosError } from "axios";
import { EitherAsync } from "purify-ts";
export declare const isAxios4xxError: (error: unknown) => error is AxiosError;
/**
 *
 * @summary Retry with exponential backoff. Fire once + retry times
 */
export declare const withRequestErrorRetry: <T, E = unknown>({ fn, retryTimes, shouldRetry, retryWaitForMs, }: {
    fn: () => Promise<T>;
    retryTimes?: number;
    shouldRetry?: (error: unknown, retryCount: number) => boolean;
    retryWaitForMs?: () => number;
}) => EitherAsync<E, T>;
