Installation
npm install --save @types/async-retry
Summary
This package contains type definitions for async-retry (https://github.com/zeit/async-retry#readme).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/async-retry.
import { WrapOptions } from 'retry';
declare function AsyncRetry<A>(
fn: AsyncRetry.RetryFunction<A>,
opts?: AsyncRetry.Options
): Promise<A>;
declare namespace AsyncRetry {
interface Options extends WrapOptions {
onRetry?: ((e: Error, attempt: number) => any) | undefined;
}
type RetryFunction<A> = (bail: (e: Error) => void, attempt: number) => A|Promise<A>;
}
export = AsyncRetry;
Additional Details
- Last updated: Tue, 26 Apr 2022 19:31:52 GMT
- Dependencies: @types/retry
- Global values: none
Credits
These definitions were written by Albert Wu, Pablo Rodríguez, and Rafał Sawicki.