better-retry
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -6,4 +6,4 @@ import { WrapOptions } from "retry"; | ||
} | ||
export type Options = WrapOptions & { | ||
export interface Options extends WrapOptions { | ||
readonly onFailedAttempt?: (error: FailedAttemptError) => void | Promise<void>; | ||
}; | ||
} |
@@ -6,4 +6,4 @@ import { WrapOptions } from "retry"; | ||
} | ||
export type Options = WrapOptions & { | ||
export interface Options extends WrapOptions { | ||
readonly onFailedAttempt?: (error: FailedAttemptError) => void | Promise<void>; | ||
}; | ||
} |
@@ -6,4 +6,4 @@ import { WrapOptions } from "retry"; | ||
} | ||
export type Options = WrapOptions & { | ||
export interface Options extends WrapOptions { | ||
readonly onFailedAttempt?: (error: FailedAttemptError) => void | Promise<void>; | ||
}; | ||
} |
@@ -6,4 +6,4 @@ import { WrapOptions } from "retry"; | ||
} | ||
export type Options = WrapOptions & { | ||
export interface Options extends WrapOptions { | ||
readonly onFailedAttempt?: (error: FailedAttemptError) => void | Promise<void>; | ||
}; | ||
} |
{ | ||
"name": "better-retry", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"licence": "MIT", | ||
@@ -5,0 +5,0 @@ "author": { |
better-retry | ||
=========================== | ||
A better way to handle retries on promise-returning/async functions, with ESM and CommonJS support. | ||
A better way to handle retries on promise-returning/async functions, with ESM, CJS, AMD and UMD support. | ||
It is basically [p-retry](https://github.com/sindresorhus/p-retry) rewritten in Typescript with Commonjs support. | ||
@@ -34,4 +34,3 @@ | ||
```ts | ||
import { betterRetry } from 'better-retry'; | ||
import { FailedAttemptError } from "./types"; | ||
import { betterRetry, FailedAttemptError } from 'better-retry'; | ||
@@ -38,0 +37,0 @@ const run = async (attempt: number) => { |
45069
48
62