@types/async 3.2.5 → 3.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. async/LICENSE +0 -0
  2. async/README.md +1 -1
  3. async/index.d.ts +17 -12
  4. async/package.json +3 -3
async/LICENSE CHANGED
File without changes
async/README.md CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for Async (https://github.com/caolan/asyn
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/async.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Mon, 30 Nov 2020 19:12:26 GMT
11
+ * Last updated: Sat, 03 Apr 2021 19:31:15 GMT
12
12
  * Dependencies: none
13
13
  * Global values: `async`
14
14
 
async/index.d.ts CHANGED
@@ -344,27 +344,32 @@ export function auto<R extends Dictionary<any>, E = Error>(tasks: AsyncAutoTasks
344
344
  export function auto<R extends Dictionary<any>, E = Error>(tasks: AsyncAutoTasks<R, E>, callback?: AsyncResultCallback<R, E>): void;
345
345
  export function autoInject<E = Error>(tasks: any, callback?: AsyncResultCallback<any, E>): void;
346
346
 
347
- export interface RetryOptions {
347
+ export interface RetryOptions<E> {
348
348
  times?: number;
349
349
  interval?: number | ((retryCount: number) => number);
350
- errorFilter?: (error: Error) => boolean;
350
+ errorFilter?: (error: E) => boolean;
351
351
  }
352
352
  export function retry<T, E = Error>(
353
- opts?: number | RetryOptions,
354
- task?: (callback: AsyncResultCallback<T, E>, results: any) => void,
355
- ): Promise<void>;
353
+ task: (() => Promise<T>) | ((callback: AsyncResultCallback<T, E>) => void),
354
+ ): Promise<T>;
356
355
  export function retry<T, E = Error>(
357
- opts?: number | RetryOptions,
358
- task?: (callback: AsyncResultCallback<T, E>, results: any) => void,
359
- callback?: AsyncResultCallback<any, E>,
356
+ opts: number | RetryOptions<E>,
357
+ task: (() => Promise<T>) | ((callback: AsyncResultCallback<T, E>) => void),
358
+ ): Promise<T>;
359
+ export function retry<T, E = Error>(
360
+ task: (() => Promise<T>) | ((callback: AsyncResultCallback<T, E>) => void),
361
+ callback: AsyncResultCallback<T, E>,
362
+ ): void;
363
+ export function retry<T, E = Error>(
364
+ opts: number | RetryOptions<E>,
365
+ task: (() => Promise<T>) | ((callback: AsyncResultCallback<T, E>) => void),
366
+ callback: AsyncResultCallback<T, E>,
360
367
  ): void;
361
368
 
362
369
  export function retryable<T, E = Error>(task: AsyncFunction<T, E>): AsyncFunction<T, E>;
363
370
  export function retryable<T, E = Error>(
364
- opts:
365
- | number
366
- | RetryOptions & {arity?: number},
367
- task: AsyncFunction<T, E>
371
+ opts: number | (RetryOptions<E> & { arity?: number }),
372
+ task: AsyncFunction<T, E>,
368
373
  ): AsyncFunction<T, E>;
369
374
  export function apply<E = Error>(fn: Function, ...args: any[]): AsyncFunction<any, E>;
370
375
  export function nextTick(callback: Function, ...args: any[]): void;
async/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/async",
3
- "version": "3.2.5",
3
+ "version": "3.2.6",
4
4
  "description": "TypeScript definitions for Async",
5
5
  "license": "MIT",
6
6
  "contributors": [
@@ -59,6 +59,6 @@
59
59
  },
60
60
  "scripts": {},
61
61
  "dependencies": {},
62
- "typesPublisherContentHash": "5d3403505c739b80abfffa8203dc15c69212c682e9995f3b0e840012bd4e0ebe",
63
- "typeScriptVersion": "3.3"
62
+ "typesPublisherContentHash": "1e9122a2100a691d3fa01608f73be72b2dbdd090f8e5d72066c2461879742eaa",
63
+ "typeScriptVersion": "3.5"
64
64
  }