@types/async 3.2.8 → 3.2.12
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.
- async/README.md +2 -2
- async/index.d.ts +75 -18
- async/package.json +8 -8
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:
|
|
11
|
+
* Last updated: Sun, 26 Dec 2021 12:01:22 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), [
|
|
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), [Etienne Rossignon](https://github.com/erossignon), [Lifeng Zhu](https://github.com/Juliiii), [Tümay Çeber](https://github.com/brendtumi), and [Andrew Pensinger](https://github.com/apnsngr).
|
async/index.d.ts
CHANGED
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
// Joe Herman <https://github.com/Penryn>
|
|
6
6
|
// Angus Fenying <https://github.com/fenying>
|
|
7
7
|
// Pascal Martin <https://github.com/pascalmartin>
|
|
8
|
-
// Dmitri Trofimov <https://github.com/Dmitri1337>
|
|
9
8
|
// Etienne Rossignon <https://github.com/erossignon>
|
|
10
9
|
// Lifeng Zhu <https://github.com/Juliiii>
|
|
11
10
|
// Tümay Çeber <https://github.com/brendtumi>
|
|
11
|
+
// Andrew Pensinger <https://github.com/apnsngr>
|
|
12
12
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
13
13
|
// TypeScript Version: 2.3
|
|
14
14
|
|
|
@@ -28,6 +28,7 @@ export interface AsyncFunctionEx<T, E = Error> { (callback: (err?: E | null, ...
|
|
|
28
28
|
export interface AsyncIterator<T, E = Error> { (item: T, callback: ErrorCallback<E>): void; }
|
|
29
29
|
export interface AsyncForEachOfIterator<T, E = Error> { (item: T, key: number|string, callback: ErrorCallback<E>): void; }
|
|
30
30
|
export interface AsyncResultIterator<T, R, E = Error> { (item: T, callback: AsyncResultCallback<R, E>): void; }
|
|
31
|
+
export interface AsyncResultIteratorPromise<T, R> { (item: T): Promise<R>; }
|
|
31
32
|
export interface AsyncMemoIterator<T, R, E = Error> { (memo: R | undefined, item: T, callback: AsyncResultCallback<R, E>): void; }
|
|
32
33
|
export interface AsyncBooleanIterator<T, E = Error> { (item: T, callback: AsyncBooleanResultCallback<E>): void; }
|
|
33
34
|
|
|
@@ -244,11 +245,26 @@ export function forEachOfLimit<T, E = Error>(obj: IterableCollection<T>, limit:
|
|
|
244
245
|
export const eachOf: typeof forEachOf;
|
|
245
246
|
export const eachOfSeries: typeof forEachOf;
|
|
246
247
|
export const eachOfLimit: typeof forEachOfLimit;
|
|
247
|
-
export function map<T, R, E = Error>(
|
|
248
|
-
|
|
248
|
+
export function map<T, R, E = Error>(
|
|
249
|
+
arr: T[] | IterableIterator<T> | Dictionary<T>,
|
|
250
|
+
iterator: (AsyncResultIterator<T, R, E> | AsyncResultIteratorPromise<T, R>),
|
|
251
|
+
callback: AsyncResultArrayCallback<R, E>
|
|
252
|
+
): void;
|
|
253
|
+
export function map<T, R, E = Error>(
|
|
254
|
+
arr: T[] | IterableIterator<T> | Dictionary<T>,
|
|
255
|
+
iterator: (AsyncResultIterator<T, R, E> | AsyncResultIteratorPromise<T, R>)
|
|
256
|
+
): Promise<R[]>;
|
|
257
|
+
|
|
249
258
|
export const mapSeries: typeof map;
|
|
250
|
-
export function mapLimit<T, R, E = Error>(
|
|
251
|
-
|
|
259
|
+
export function mapLimit<T, R, E = Error>(
|
|
260
|
+
arr: IterableCollection<T>,
|
|
261
|
+
limit: number, iterator: (AsyncResultIterator<T, R, E> | AsyncResultIteratorPromise<T, R>),
|
|
262
|
+
callback: AsyncResultArrayCallback<R, E>
|
|
263
|
+
): void;
|
|
264
|
+
export function mapLimit<T, R, E = Error>(
|
|
265
|
+
arr: IterableCollection<T>,
|
|
266
|
+
limit: number, iterator: (AsyncResultIterator<T, R, E> | AsyncResultIteratorPromise<T, R>)
|
|
267
|
+
): Promise<R[]>;
|
|
252
268
|
|
|
253
269
|
export function mapValuesLimit<T, R, E = Error>(
|
|
254
270
|
obj: Dictionary<T>,
|
|
@@ -302,7 +318,8 @@ export const allSeries: typeof every;
|
|
|
302
318
|
export const allLimit: typeof everyLimit;
|
|
303
319
|
|
|
304
320
|
export function concat<T, R, E = Error>(arr: IterableCollection<T>, iterator: AsyncResultIterator<T, R[], E>, callback?: AsyncResultArrayCallback<R, E>): void;
|
|
305
|
-
export function concatLimit<T, R, E = Error>(arr: IterableCollection<T>, limit: number, iterator: AsyncResultIterator<T, R[], E>, callback
|
|
321
|
+
export function concatLimit<T, R, E = Error>(arr: IterableCollection<T>, limit: number, iterator: AsyncResultIterator<T, R[], E>, callback: AsyncResultArrayCallback<R, E>): void;
|
|
322
|
+
export function concatLimit<T, R, E = Error>(arr: IterableCollection<T>, limit: number, iterator: AsyncResultIterator<T, R[], E>): Promise<R[]>;
|
|
306
323
|
export const concatSeries: typeof concat;
|
|
307
324
|
|
|
308
325
|
// Control Flow
|
|
@@ -315,14 +332,44 @@ export function parallel<T, R, E = Error>(tasks: Array<AsyncFunction<T, E>> | Di
|
|
|
315
332
|
export function parallelLimit<T, E = Error>(tasks: Array<AsyncFunction<T, E>>, limit: number, callback?: AsyncResultArrayCallback<T, E>): void;
|
|
316
333
|
export function parallelLimit<T, E = Error>(tasks: Dictionary<AsyncFunction<T, E>>, limit: number, callback?: AsyncResultObjectCallback<T, E>): void;
|
|
317
334
|
export function parallelLimit<T, R, E = Error>(tasks: Array<AsyncFunction<T, E>> | Dictionary<AsyncFunction<T, E>>, limit: number): Promise<R>;
|
|
318
|
-
|
|
319
|
-
export function whilst<
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
export function
|
|
325
|
-
|
|
335
|
+
|
|
336
|
+
export function whilst<T, E = Error>(
|
|
337
|
+
test: (cb: AsyncBooleanResultCallback) => void,
|
|
338
|
+
fn: AsyncFunctionEx<T, E>,
|
|
339
|
+
callback: AsyncFunctionEx<T, E>
|
|
340
|
+
): void;
|
|
341
|
+
export function whilst<T, R, E = Error>(
|
|
342
|
+
test: (cb: AsyncBooleanResultCallback) => void,
|
|
343
|
+
fn: AsyncFunctionEx<T, E>
|
|
344
|
+
): Promise<R>;
|
|
345
|
+
export function doWhilst<T, E = Error>(
|
|
346
|
+
fn: AsyncFunctionEx<T, E>,
|
|
347
|
+
test: (/* ...results: T[], */ cb: AsyncBooleanResultCallback) => void,
|
|
348
|
+
callback: AsyncFunctionEx<T, E>
|
|
349
|
+
): void;
|
|
350
|
+
export function doWhilst<T, R, E = Error>(
|
|
351
|
+
fn: AsyncFunctionEx<T, E>,
|
|
352
|
+
test: (/* ...results: T[], */ cb: AsyncBooleanResultCallback) => void
|
|
353
|
+
): Promise<R>;
|
|
354
|
+
export function until<T, E = Error>(
|
|
355
|
+
test: (cb: AsyncBooleanResultCallback) => void,
|
|
356
|
+
fn: AsyncFunctionEx<T, E>,
|
|
357
|
+
callback: AsyncFunctionEx<T, E>
|
|
358
|
+
): void;
|
|
359
|
+
export function until<T, R, E = Error>(
|
|
360
|
+
test: (cb: AsyncBooleanResultCallback) => void,
|
|
361
|
+
fn: AsyncFunctionEx<T, E>
|
|
362
|
+
): Promise<R>;
|
|
363
|
+
export function doUntil<T, E = Error>(
|
|
364
|
+
fn: AsyncFunctionEx<T, E>,
|
|
365
|
+
test: (/* ...results: T[], */ cb: AsyncBooleanResultCallback) => void,
|
|
366
|
+
callback: AsyncFunctionEx<T, E>
|
|
367
|
+
): void;
|
|
368
|
+
export function doUntil<T, R, E = Error>(
|
|
369
|
+
fn: AsyncFunctionEx<T, E>,
|
|
370
|
+
test: (/* ...results: T[], */ cb: AsyncBooleanResultCallback) => void
|
|
371
|
+
): Promise<R>;
|
|
372
|
+
|
|
326
373
|
export function during<E = Error>(test: (testCallback: AsyncBooleanResultCallback<E>) => void, fn: AsyncVoidFunction<E>, callback: ErrorCallback<E>): void;
|
|
327
374
|
export function doDuring<E = Error>(fn: AsyncVoidFunction<E>, test: (testCallback: AsyncBooleanResultCallback<E>) => void, callback: ErrorCallback<E>): void;
|
|
328
375
|
export function forever<E = Error>(next: (next: ErrorCallback<E>) => void, errBack: ErrorCallback<E>): void;
|
|
@@ -382,11 +429,21 @@ export function reflectAll<T, E = Error>(tasks: Array<AsyncFunction<T, E>>): Arr
|
|
|
382
429
|
export function timeout<T, E = Error>(fn: AsyncFunction<T, E>, milliseconds: number, info?: any): AsyncFunction<T, E>;
|
|
383
430
|
export function timeout<T, R, E = Error>(fn: AsyncResultIterator<T, R, E>, milliseconds: number, info?: any): AsyncResultIterator<T, R, E>;
|
|
384
431
|
|
|
385
|
-
export function times<T, E = Error>(n: number, iterator: AsyncResultIterator<number, T, E
|
|
386
|
-
export function times<T, E = Error>(n: number, iterator: AsyncResultIterator<number, T, E>): Promise<T>;
|
|
432
|
+
export function times<T, E = Error>(n: number, iterator: (AsyncResultIterator<number, T, E> | AsyncResultIteratorPromise<number, T>), callback: AsyncResultArrayCallback<T, E>): void;
|
|
433
|
+
export function times<T, E = Error>(n: number, iterator: (AsyncResultIterator<number, T, E> | AsyncResultIteratorPromise<number, T>)): Promise<T>;
|
|
434
|
+
|
|
387
435
|
export const timesSeries: typeof times;
|
|
388
|
-
export function timesLimit<T, E = Error>(
|
|
389
|
-
|
|
436
|
+
export function timesLimit<T, E = Error>(
|
|
437
|
+
n: number,
|
|
438
|
+
limit: number,
|
|
439
|
+
iterator: (AsyncResultIterator<number, T, E> | AsyncResultIteratorPromise<number, T>),
|
|
440
|
+
callback: AsyncResultArrayCallback<T, E>
|
|
441
|
+
): void;
|
|
442
|
+
export function timesLimit<T, E = Error>(
|
|
443
|
+
n: number,
|
|
444
|
+
limit: number,
|
|
445
|
+
iterator: (AsyncResultIterator<number, T, E> | AsyncResultIteratorPromise<number, T>)
|
|
446
|
+
): Promise<T>;
|
|
390
447
|
|
|
391
448
|
export function transform<T, R, E = Error>(arr: T[], iteratee: (acc: R[], item: T, key: number, callback: (error?: E) => void) => void, callback?: AsyncResultArrayCallback<T, E>): void;
|
|
392
449
|
export function transform<T, R, E = Error>(arr: T[], acc: R[], iteratee: (acc: R[], item: T, key: number, callback: (error?: E) => void) => void, callback?: AsyncResultArrayCallback<T, E>): void;
|
async/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/async",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.12",
|
|
4
4
|
"description": "TypeScript definitions for Async",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/async",
|
|
6
6
|
"license": "MIT",
|
|
@@ -30,11 +30,6 @@
|
|
|
30
30
|
"url": "https://github.com/pascalmartin",
|
|
31
31
|
"githubUsername": "pascalmartin"
|
|
32
32
|
},
|
|
33
|
-
{
|
|
34
|
-
"name": "Dmitri Trofimov",
|
|
35
|
-
"url": "https://github.com/Dmitri1337",
|
|
36
|
-
"githubUsername": "Dmitri1337"
|
|
37
|
-
},
|
|
38
33
|
{
|
|
39
34
|
"name": "Etienne Rossignon",
|
|
40
35
|
"url": "https://github.com/erossignon",
|
|
@@ -49,6 +44,11 @@
|
|
|
49
44
|
"name": "Tümay Çeber",
|
|
50
45
|
"url": "https://github.com/brendtumi",
|
|
51
46
|
"githubUsername": "brendtumi"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"name": "Andrew Pensinger",
|
|
50
|
+
"url": "https://github.com/apnsngr",
|
|
51
|
+
"githubUsername": "apnsngr"
|
|
52
52
|
}
|
|
53
53
|
],
|
|
54
54
|
"main": "",
|
|
@@ -60,6 +60,6 @@
|
|
|
60
60
|
},
|
|
61
61
|
"scripts": {},
|
|
62
62
|
"dependencies": {},
|
|
63
|
-
"typesPublisherContentHash": "
|
|
64
|
-
"typeScriptVersion": "3.
|
|
63
|
+
"typesPublisherContentHash": "a14b6ee9ce4edbdcc61a907887cacbfbbd4e0f6ec63b045475e37be787ce4e65",
|
|
64
|
+
"typeScriptVersion": "3.8"
|
|
65
65
|
}
|