@teneff/with-retry
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -1,1 +0,1 @@ | ||
export declare type Constructor<T> = new (...args: any[]) => T; | ||
export type Constructor<T> = new (...args: any[]) => T; |
{ | ||
"name": "@teneff/with-retry", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Decorator for retrying async operations", | ||
@@ -31,5 +31,5 @@ "main": "index.js", | ||
"devDependencies": { | ||
"@types/jest": "^27.4.1", | ||
"@typescript-eslint/eslint-plugin": "^5.17.0", | ||
"@typescript-eslint/parser": "^5.17.0", | ||
"@types/jest": "^29.5.12", | ||
"@typescript-eslint/eslint-plugin": "^7.6.0", | ||
"@typescript-eslint/parser": "^7.6.0", | ||
"codecov": "^3.8.3", | ||
@@ -39,25 +39,8 @@ "eslint": "^8.12.0", | ||
"eslint-plugin-import": "^2.25.4", | ||
"eslint-plugin-jest": "^26.1.3", | ||
"jest": "^27.5.1", | ||
"rimraf": "^3.0.2", | ||
"ts-jest": "^27.1.4", | ||
"typescript": "^4.6.3" | ||
}, | ||
"jest": { | ||
"preset": "ts-jest", | ||
"rootDir": "src", | ||
"globals": { | ||
"ts-jest": { | ||
"tsconfig": "tsconfig.jest.json" | ||
} | ||
}, | ||
"coverageThreshold": { | ||
"global": { | ||
"branches": 100, | ||
"functions": 100, | ||
"lines": 100, | ||
"statements": 100 | ||
} | ||
} | ||
"eslint-plugin-jest": "^28.2.0", | ||
"jest": "^29.7.0", | ||
"rimraf": "^5.0.5", | ||
"ts-jest": "^29.1.2", | ||
"typescript": "^5.4.4" | ||
} | ||
} |
import { Constructor } from "./Constructor"; | ||
declare type DelayCallback<E> = (arg: { | ||
type DelayCallback<E> = (arg: { | ||
call: number; | ||
errors: E[]; | ||
}) => number; | ||
export declare type Settings<E> = { | ||
export type Settings<E> = { | ||
maxCalls: number; | ||
@@ -8,0 +8,0 @@ errors: Constructor<E>[]; |
import { Settings } from "./Settings"; | ||
declare type WithRetry = <T, Y extends unknown[]>(callback: (...args: Y) => Promise<T>) => (...args: Y) => Promise<T>; | ||
type WithRetry = <T, Y extends unknown[]>(callback: (...args: Y) => Promise<T>) => (...args: Y) => Promise<T>; | ||
export default function withRetry(options?: Partial<Settings<Error>>): WithRetry; | ||
export {}; |
9421