mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-22 11:57:33 +08:00
19 lines
608 B
TypeScript
19 lines
608 B
TypeScript
// Type definitions for p-retry 1.0
|
|
// Project: https://github.com/sindresorhus/p-retry#readme
|
|
// Definitions by: BendingBender <https://github.com/BendingBender>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
|
|
import { OperationOptions } from 'retry';
|
|
|
|
export = pRetry;
|
|
|
|
declare function pRetry<T>(input: (attemptCount: number) => PromiseLike<T> | T, options?: OperationOptions): Promise<T>;
|
|
|
|
declare namespace pRetry {
|
|
class AbortError extends Error {
|
|
readonly name: 'AbortError';
|
|
readonly originalError: Error;
|
|
constructor(message: string | Error);
|
|
}
|
|
}
|