@types/async
Advanced tools
Comparing version 3.2.5 to 3.2.6
@@ -347,23 +347,28 @@ // Type definitions for Async 3.2 | ||
export interface RetryOptions { | ||
export interface RetryOptions<E> { | ||
times?: number; | ||
interval?: number | ((retryCount: number) => number); | ||
errorFilter?: (error: Error) => boolean; | ||
errorFilter?: (error: E) => boolean; | ||
} | ||
export function retry<T, E = Error>( | ||
opts?: number | RetryOptions, | ||
task?: (callback: AsyncResultCallback<T, E>, results: any) => void, | ||
): Promise<void>; | ||
task: (() => Promise<T>) | ((callback: AsyncResultCallback<T, E>) => void), | ||
): Promise<T>; | ||
export function retry<T, E = Error>( | ||
opts?: number | RetryOptions, | ||
task?: (callback: AsyncResultCallback<T, E>, results: any) => void, | ||
callback?: AsyncResultCallback<any, E>, | ||
opts: number | RetryOptions<E>, | ||
task: (() => Promise<T>) | ((callback: AsyncResultCallback<T, E>) => void), | ||
): Promise<T>; | ||
export function retry<T, E = Error>( | ||
task: (() => Promise<T>) | ((callback: AsyncResultCallback<T, E>) => void), | ||
callback: AsyncResultCallback<T, E>, | ||
): void; | ||
export function retry<T, E = Error>( | ||
opts: number | RetryOptions<E>, | ||
task: (() => Promise<T>) | ((callback: AsyncResultCallback<T, E>) => void), | ||
callback: AsyncResultCallback<T, E>, | ||
): void; | ||
export function retryable<T, E = Error>(task: AsyncFunction<T, E>): AsyncFunction<T, E>; | ||
export function retryable<T, E = Error>( | ||
opts: | ||
| number | ||
| RetryOptions & {arity?: number}, | ||
task: AsyncFunction<T, E> | ||
opts: number | (RetryOptions<E> & { arity?: number }), | ||
task: AsyncFunction<T, E>, | ||
): AsyncFunction<T, E>; | ||
@@ -370,0 +375,0 @@ export function apply<E = Error>(fn: Function, ...args: any[]): AsyncFunction<any, E>; |
{ | ||
"name": "@types/async", | ||
"version": "3.2.5", | ||
"version": "3.2.6", | ||
"description": "TypeScript definitions for Async", | ||
@@ -62,4 +62,4 @@ "license": "MIT", | ||
"dependencies": {}, | ||
"typesPublisherContentHash": "5d3403505c739b80abfffa8203dc15c69212c682e9995f3b0e840012bd4e0ebe", | ||
"typeScriptVersion": "3.3" | ||
"typesPublisherContentHash": "1e9122a2100a691d3fa01608f73be72b2dbdd090f8e5d72066c2461879742eaa", | ||
"typeScriptVersion": "3.5" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
### Additional Details | ||
* Last updated: Mon, 30 Nov 2020 19:12:26 GMT | ||
* Last updated: Sat, 03 Apr 2021 19:31:15 GMT | ||
* Dependencies: none | ||
@@ -14,0 +14,0 @@ * Global values: `async` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
26988
367