import { MonoTypeOperatorFunction } from 'rxjs'; /** * The options object that can be passed to `retryWithBackoff` */ export interface RetryWithBackoff { retries: number; delayCalculator: (attempt: number) => number; } /** * Return the difference in time in words * * @param options - The options object * - `retries`: How many times it should retry before throwing an error * - `delayCalculator`: The calculator to determine the delay timing * @returns The observable timer * * @example * return this.exampleDatabase.getSomething() * .pipe( * map((res: MyResponse) => { * if (res) { * return res; * } else { * return null; * } * }), * retryWithBackoff({}), // Using default options * ) * ; */ export declare const retryWithBackoff: ({ retries, delayCalculator, }: Partial) => MonoTypeOperatorFunction;