@types/async 3.0.8 → 3.2.3

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 +21 -21
  2. async/README.md +2 -2
  3. async/index.d.ts +28 -21
  4. async/package.json +8 -3
async/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) Microsoft Corporation. All rights reserved.
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE
1
+ MIT License
2
+
3
+ Copyright (c) Microsoft Corporation.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE
async/README.md CHANGED
@@ -8,9 +8,9 @@ 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: Tue, 18 Feb 2020 19:36:58 GMT
11
+ * Last updated: Fri, 15 May 2020 04:08:47 GMT
12
12
  * Dependencies: none
13
13
  * Global values: `async`
14
14
 
15
15
  # Credits
16
- These definitions were written by [Boris Yankov](https://github.com/borisyankov), [Arseniy Maximov](https://github.com/kern0), [Joe Herman](https://github.com/Penryn), [Angus Fenying](https://github.com/fenying), [Pascal Martin](https://github.com/pascalmartin), [Dmitri Trofimov](https://github.com/Dmitri1337), [Etienne Rossignon](https://github.com/erossignon), and [Lifeng Zhu](https://github.com/Juliiii).
16
+ These definitions were written by [Boris Yankov](https://github.com/borisyankov), [Arseniy Maximov](https://github.com/kern0), [Joe Herman](https://github.com/Penryn), [Angus Fenying](https://github.com/fenying), [Pascal Martin](https://github.com/pascalmartin), [Dmitri Trofimov](https://github.com/Dmitri1337), [Etienne Rossignon](https://github.com/erossignon), [Lifeng Zhu](https://github.com/Juliiii), and [Tümay Çeber](https://github.com/brendtumi).
async/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Type definitions for Async 3.0
1
+ // Type definitions for Async 3.2
2
2
  // Project: https://github.com/caolan/async, https://caolan.github.io/async
3
3
  // Definitions by: Boris Yankov <https://github.com/borisyankov>
4
4
  // Arseniy Maximov <https://github.com/kern0>
@@ -8,6 +8,7 @@
8
8
  // Dmitri Trofimov <https://github.com/Dmitri1337>
9
9
  // Etienne Rossignon <https://github.com/erossignon>
10
10
  // Lifeng Zhu <https://github.com/Juliiii>
11
+ // Tümay Çeber <https://github.com/brendtumi>
11
12
  // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
12
13
  // TypeScript Version: 2.3
13
14
 
@@ -136,10 +137,10 @@ export const eachOf: typeof forEachOf;
136
137
  export const eachOfSeries: typeof forEachOf;
137
138
  export const eachOfLimit: typeof forEachOfLimit;
138
139
  export function map<T, R, E = Error>(arr: T[] | IterableIterator<T> | Dictionary<T>, iterator: AsyncResultIterator<T, R, E>, callback: AsyncResultArrayCallback<R, E>): void;
139
- export function map<T, R, E = Error>(arr: T[] | IterableIterator<T> | Dictionary<T>, iterator: AsyncResultIterator<T, R, E>): Promise<R>;
140
+ export function map<T, R, E = Error>(arr: T[] | IterableIterator<T> | Dictionary<T>, iterator: AsyncResultIterator<T, R, E>): Promise<R[]>;
140
141
  export const mapSeries: typeof map;
141
142
  export function mapLimit<T, R, E = Error>(arr: IterableCollection<T>, limit: number, iterator: AsyncResultIterator<T, R, E>, callback: AsyncResultArrayCallback<R, E>): void;
142
- export function mapLimit<T, R, E = Error>(arr: IterableCollection<T>, limit: number, iterator: AsyncResultIterator<T, R, E>): Promise<R>;
143
+ export function mapLimit<T, R, E = Error>(arr: IterableCollection<T>, limit: number, iterator: AsyncResultIterator<T, R, E>): Promise<R[]>;
143
144
 
144
145
  export function mapValuesLimit<T, R, E = Error>(
145
146
  obj: Dictionary<T>,
@@ -148,9 +149,9 @@ export function mapValuesLimit<T, R, E = Error>(
148
149
  callback: AsyncResultObjectCallback<R, E>
149
150
  ): void;
150
151
  export function mapValuesLimit<T, R, E = Error>(
151
- obj: Dictionary<T>,
152
- limit: number,
153
- iteratee: (value: T, key: string, callback: AsyncResultCallback<R, E>) => void
152
+ obj: Dictionary<T>,
153
+ limit: number,
154
+ iteratee: (value: T, key: string, callback: AsyncResultCallback<R, E>) => void
154
155
  ): Promise<R>;
155
156
 
156
157
  export function mapValues<T, R, E = Error>(obj: Dictionary<T>, iteratee: (value: T, key: string, callback: AsyncResultCallback<R, E>) => void, callback: AsyncResultObjectCallback<R, E>): void;
@@ -199,14 +200,21 @@ export const concatSeries: typeof concat;
199
200
  // Control Flow
200
201
  export function series<T, E = Error>(tasks: Array<AsyncFunction<T, E>>, callback?: AsyncResultArrayCallback<T, E>): void;
201
202
  export function series<T, E = Error>(tasks: Dictionary<AsyncFunction<T, E>>, callback?: AsyncResultObjectCallback<T, E>): void;
203
+ export function series<T, R, E = Error>(tasks: Array<AsyncFunction<T, E>> | Dictionary<AsyncFunction<T, E>>): Promise<R>;
202
204
  export function parallel<T, E = Error>(tasks: Array<AsyncFunction<T, E>>, callback?: AsyncResultArrayCallback<T, E>): void;
203
205
  export function parallel<T, E = Error>(tasks: Dictionary<AsyncFunction<T, E>>, callback?: AsyncResultObjectCallback<T, E>): void;
206
+ export function parallel<T, R, E = Error>(tasks: Array<AsyncFunction<T, E>> | Dictionary<AsyncFunction<T, E>>): Promise<R>;
204
207
  export function parallelLimit<T, E = Error>(tasks: Array<AsyncFunction<T, E>>, limit: number, callback?: AsyncResultArrayCallback<T, E>): void;
205
208
  export function parallelLimit<T, E = Error>(tasks: Dictionary<AsyncFunction<T, E>>, limit: number, callback?: AsyncResultObjectCallback<T, E>): void;
209
+ export function parallelLimit<T, R, E = Error>(tasks: Array<AsyncFunction<T, E>> | Dictionary<AsyncFunction<T, E>>, limit: number): Promise<R>;
206
210
  export function whilst<E = Error>(test: () => boolean, fn: AsyncVoidFunction<E>, callback: ErrorCallback<E>): void;
211
+ export function whilst<R, E = Error>(test: () => boolean, fn: AsyncVoidFunction<E>): Promise<R>;
207
212
  export function doWhilst<T, E = Error>(fn: AsyncFunctionEx<T, E>, test: (...results: T[]) => boolean, callback: ErrorCallback<E>): void;
213
+ export function doWhilst<T, R, E = Error>(fn: AsyncFunctionEx<T, E>, test: (...results: T[]) => boolean): Promise<R>;
208
214
  export function until<E = Error>(test: () => boolean, fn: AsyncVoidFunction<E>, callback: ErrorCallback<E>): void;
215
+ export function until<R, E = Error>(test: () => boolean, fn: AsyncVoidFunction<E>): Promise<R>;
209
216
  export function doUntil<T, E = Error>(fn: AsyncFunctionEx<T, E>, test: (...results: T[]) => boolean, callback: ErrorCallback<E>): void;
217
+ export function doUntil<T, R, E = Error>(fn: AsyncFunctionEx<T, E>, test: (...results: T[]) => boolean): Promise<R>;
210
218
  export function during<E = Error>(test: (testCallback: AsyncBooleanResultCallback<E>) => void, fn: AsyncVoidFunction<E>, callback: ErrorCallback<E>): void;
211
219
  export function doDuring<E = Error>(fn: AsyncVoidFunction<E>, test: (testCallback: AsyncBooleanResultCallback<E>) => void, callback: ErrorCallback<E>): void;
212
220
  export function forever<E = Error>(next: (next: ErrorCallback<E>) => void, errBack: ErrorCallback<E>): void;
@@ -223,29 +231,28 @@ export function auto<R extends Dictionary<any>, E = Error>(tasks: AsyncAutoTasks
223
231
  export function auto<R extends Dictionary<any>, E = Error>(tasks: AsyncAutoTasks<R, E>, callback?: AsyncResultCallback<R, E>): void;
224
232
  export function autoInject<E = Error>(tasks: any, callback?: AsyncResultCallback<any, E>): void;
225
233
 
234
+ export interface RetryOptions {
235
+ times?: number;
236
+ interval?: number | ((retryCount: number) => number);
237
+ errorFilter?: (error: Error) => boolean;
238
+ }
226
239
  export function retry<T, E = Error>(
227
- opts?:
228
- | number
229
- | {
230
- times?: number;
231
- interval?: number | ((retryCount: number) => number);
232
- errorFilter?: (error: Error) => boolean;
233
- },
240
+ opts?: number | RetryOptions,
234
241
  task?: (callback: AsyncResultCallback<T, E>, results: any) => void,
235
242
  ): Promise<void>;
236
243
  export function retry<T, E = Error>(
237
- opts?:
238
- | number
239
- | {
240
- times?: number;
241
- interval?: number | ((retryCount: number) => number);
242
- errorFilter?: (error: Error) => boolean;
243
- },
244
+ opts?: number | RetryOptions,
244
245
  task?: (callback: AsyncResultCallback<T, E>, results: any) => void,
245
246
  callback?: AsyncResultCallback<any, E>,
246
247
  ): void;
247
248
 
248
- export function retryable<T, E = Error>(opts: number | {times: number, interval: number}, task: AsyncFunction<T, E>): AsyncFunction<T, E>;
249
+ export function retryable<T, E = Error>(task: AsyncFunction<T, E>): AsyncFunction<T, E>;
250
+ export function retryable<T, E = Error>(
251
+ opts:
252
+ | number
253
+ | RetryOptions & {arity?: number},
254
+ task: AsyncFunction<T, E>
255
+ ): AsyncFunction<T, E>;
249
256
  export function apply<E = Error>(fn: Function, ...args: any[]): AsyncFunction<any, E>;
250
257
  export function nextTick(callback: Function, ...args: any[]): void;
251
258
  export const setImmediate: typeof nextTick;
async/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/async",
3
- "version": "3.0.8",
3
+ "version": "3.2.3",
4
4
  "description": "TypeScript definitions for Async",
5
5
  "license": "MIT",
6
6
  "contributors": [
@@ -43,6 +43,11 @@
43
43
  "name": "Lifeng Zhu",
44
44
  "url": "https://github.com/Juliiii",
45
45
  "githubUsername": "Juliiii"
46
+ },
47
+ {
48
+ "name": "Tümay Çeber",
49
+ "url": "https://github.com/brendtumi",
50
+ "githubUsername": "brendtumi"
46
51
  }
47
52
  ],
48
53
  "main": "",
@@ -54,6 +59,6 @@
54
59
  },
55
60
  "scripts": {},
56
61
  "dependencies": {},
57
- "typesPublisherContentHash": "4097fc7562e1a4a9b905bb4578629dc8139cfd4f3bc1868db98b659a4fa87757",
58
- "typeScriptVersion": "2.8"
62
+ "typesPublisherContentHash": "81e047871626508bdf9169741b829f659624ec62fcdfa6ddb9deb317ca2a143c",
63
+ "typeScriptVersion": "3.0"
59
64
  }