import { SupplierPromise } from "../types"; import { RetryOptions } from "./RetryOptions"; /** * Retries the `supplier` when `errorEquals` returns `true` by waiting `intervalMilliseconds` (`i`) multiplied by the * `backOffRate` (`b`) to the power of the number of `attempts` (`a`) (i.e., `i * b ^ a`) made until the `maxAttempts` * is reached. For a fully failed example with defaults, * * 1. Executes `supplier` and fails. * 2. Retry after 1 second (1 * 2 ^ 0) and fails. * 3. Retry after 2 seconds (1 * 2 ^ 1) and fails. * 4. Retry after 4 seconds (1 * 2 ^ 2) and fails. * 5. Rejects with failure. * * @param options - Retry parameters. * @returns The result of the `supplier`. */ export declare function retry(supplier: SupplierPromise, options?: RetryOptions): Promise;