backoff.d.ts 443 B

123456789
  1. import { IBackOffOptions, BackoffOptions } from "./options";
  2. export { BackoffOptions, IBackOffOptions };
  3. /**
  4. * Executes a function with exponential backoff.
  5. * @param request the function to be executed
  6. * @param options options to customize the backoff behavior
  7. * @returns Promise that resolves to the result of the `request` function
  8. */
  9. export declare function backOff<T>(request: () => Promise<T>, options?: BackoffOptions): Promise<T>;