UNPKG

@parzh/retryable

Version:

Convenience function to retry an action

10 lines (9 loc) 360 B
/** @public */ declare const delays: { /** @see https://en.wikipedia.org/wiki/Exponential_backoff */ readonly exponential: (retryCount: number) => number; }; export declare type DelayNamed = keyof typeof delays; export declare type Delay = number | DelayNamed; export declare function isNamed(delay: Delay): delay is DelayNamed; export default delays;