@types/async 3.2.6 → 3.2.10
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 +50 -17
- async/package.json +9 -3
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: Mon, 15 Nov 2021 17:01:34 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), [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), [Tümay Çeber](https://github.com/brendtumi), and [Andrew Pensinger](https://github.com/apnsngr).
|
async/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
// Etienne Rossignon <https://github.com/erossignon>
|
|
10
10
|
// Lifeng Zhu <https://github.com/Juliiii>
|
|
11
11
|
// Tümay Çeber <https://github.com/brendtumi>
|
|
12
|
+
// Andrew Pensinger <https://github.com/apnsngr>
|
|
12
13
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
13
14
|
// TypeScript Version: 2.3
|
|
14
15
|
|
|
@@ -302,7 +303,8 @@ export const allSeries: typeof every;
|
|
|
302
303
|
export const allLimit: typeof everyLimit;
|
|
303
304
|
|
|
304
305
|
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
|
|
306
|
+
export function concatLimit<T, R, E = Error>(arr: IterableCollection<T>, limit: number, iterator: AsyncResultIterator<T, R[], E>, callback: AsyncResultArrayCallback<R, E>): void;
|
|
307
|
+
export function concatLimit<T, R, E = Error>(arr: IterableCollection<T>, limit: number, iterator: AsyncResultIterator<T, R[], E>): Promise<R[]>;
|
|
306
308
|
export const concatSeries: typeof concat;
|
|
307
309
|
|
|
308
310
|
// Control Flow
|
|
@@ -315,14 +317,44 @@ export function parallel<T, R, E = Error>(tasks: Array<AsyncFunction<T, E>> | Di
|
|
|
315
317
|
export function parallelLimit<T, E = Error>(tasks: Array<AsyncFunction<T, E>>, limit: number, callback?: AsyncResultArrayCallback<T, E>): void;
|
|
316
318
|
export function parallelLimit<T, E = Error>(tasks: Dictionary<AsyncFunction<T, E>>, limit: number, callback?: AsyncResultObjectCallback<T, E>): void;
|
|
317
319
|
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
|
-
|
|
320
|
+
|
|
321
|
+
export function whilst<T, E = Error>(
|
|
322
|
+
test: (cb: AsyncBooleanResultCallback) => void,
|
|
323
|
+
fn: AsyncFunctionEx<T, E>,
|
|
324
|
+
callback: AsyncFunctionEx<T, E>
|
|
325
|
+
): void;
|
|
326
|
+
export function whilst<T, R, E = Error>(
|
|
327
|
+
test: (cb: AsyncBooleanResultCallback) => void,
|
|
328
|
+
fn: AsyncFunctionEx<T, E>
|
|
329
|
+
): Promise<R>;
|
|
330
|
+
export function doWhilst<T, E = Error>(
|
|
331
|
+
fn: AsyncFunctionEx<T, E>,
|
|
332
|
+
test: (/* ...results: T[], */ cb: AsyncBooleanResultCallback) => void,
|
|
333
|
+
callback: AsyncFunctionEx<T, E>
|
|
334
|
+
): void;
|
|
335
|
+
export function doWhilst<T, R, E = Error>(
|
|
336
|
+
fn: AsyncFunctionEx<T, E>,
|
|
337
|
+
test: (/* ...results: T[], */ cb: AsyncBooleanResultCallback) => void
|
|
338
|
+
): Promise<R>;
|
|
339
|
+
export function until<T, E = Error>(
|
|
340
|
+
test: (cb: AsyncBooleanResultCallback) => void,
|
|
341
|
+
fn: AsyncFunctionEx<T, E>,
|
|
342
|
+
callback: AsyncFunctionEx<T, E>
|
|
343
|
+
): void;
|
|
344
|
+
export function until<T, R, E = Error>(
|
|
345
|
+
test: (cb: AsyncBooleanResultCallback) => void,
|
|
346
|
+
fn: AsyncFunctionEx<T, E>
|
|
347
|
+
): Promise<R>;
|
|
348
|
+
export function doUntil<T, E = Error>(
|
|
349
|
+
fn: AsyncFunctionEx<T, E>,
|
|
350
|
+
test: (/* ...results: T[], */ cb: AsyncBooleanResultCallback) => void,
|
|
351
|
+
callback: AsyncFunctionEx<T, E>
|
|
352
|
+
): void;
|
|
353
|
+
export function doUntil<T, R, E = Error>(
|
|
354
|
+
fn: AsyncFunctionEx<T, E>,
|
|
355
|
+
test: (/* ...results: T[], */ cb: AsyncBooleanResultCallback) => void
|
|
356
|
+
): Promise<R>;
|
|
357
|
+
|
|
326
358
|
export function during<E = Error>(test: (testCallback: AsyncBooleanResultCallback<E>) => void, fn: AsyncVoidFunction<E>, callback: ErrorCallback<E>): void;
|
|
327
359
|
export function doDuring<E = Error>(fn: AsyncVoidFunction<E>, test: (testCallback: AsyncBooleanResultCallback<E>) => void, callback: ErrorCallback<E>): void;
|
|
328
360
|
export function forever<E = Error>(next: (next: ErrorCallback<E>) => void, errBack: ErrorCallback<E>): void;
|
|
@@ -340,14 +372,15 @@ export function cargoQueue<T, E = Error>(
|
|
|
340
372
|
concurrency?: number,
|
|
341
373
|
payload?: number,
|
|
342
374
|
): QueueObject<T>;
|
|
343
|
-
export function auto<R extends Dictionary<any>, E = Error>(tasks: AsyncAutoTasks<R, E>, concurrency?: number
|
|
344
|
-
export function auto<R extends Dictionary<any>, E = Error>(tasks: AsyncAutoTasks<R, E>, callback
|
|
375
|
+
export function auto<R extends Dictionary<any>, E = Error>(tasks: AsyncAutoTasks<R, E>, concurrency?: number): Promise<R>;
|
|
376
|
+
export function auto<R extends Dictionary<any>, E = Error>(tasks: AsyncAutoTasks<R, E>, concurrency: number, callback: AsyncResultCallback<R, E>): void;
|
|
377
|
+
export function auto<R extends Dictionary<any>, E = Error>(tasks: AsyncAutoTasks<R, E>, callback: AsyncResultCallback<R, E>): void;
|
|
345
378
|
export function autoInject<E = Error>(tasks: any, callback?: AsyncResultCallback<any, E>): void;
|
|
346
379
|
|
|
347
380
|
export interface RetryOptions<E> {
|
|
348
|
-
times?: number;
|
|
349
|
-
interval?: number | ((retryCount: number) => number);
|
|
350
|
-
errorFilter?: (error: E) => boolean;
|
|
381
|
+
times?: number | undefined;
|
|
382
|
+
interval?: number | ((retryCount: number) => number) | undefined;
|
|
383
|
+
errorFilter?: ((error: E) => boolean) | undefined;
|
|
351
384
|
}
|
|
352
385
|
export function retry<T, E = Error>(
|
|
353
386
|
task: (() => Promise<T>) | ((callback: AsyncResultCallback<T, E>) => void),
|
|
@@ -368,15 +401,15 @@ export function retry<T, E = Error>(
|
|
|
368
401
|
|
|
369
402
|
export function retryable<T, E = Error>(task: AsyncFunction<T, E>): AsyncFunction<T, E>;
|
|
370
403
|
export function retryable<T, E = Error>(
|
|
371
|
-
opts: number | (RetryOptions<E> & { arity?: number }),
|
|
404
|
+
opts: number | (RetryOptions<E> & { arity?: number | undefined }),
|
|
372
405
|
task: AsyncFunction<T, E>,
|
|
373
406
|
): AsyncFunction<T, E>;
|
|
374
407
|
export function apply<E = Error>(fn: Function, ...args: any[]): AsyncFunction<any, E>;
|
|
375
408
|
export function nextTick(callback: Function, ...args: any[]): void;
|
|
376
409
|
export const setImmediate: typeof nextTick;
|
|
377
410
|
|
|
378
|
-
export function reflect<T, E = Error>(fn: AsyncFunction<T, E>): (callback: (err: null, result: {error?: E, value?: T}) => void) => void;
|
|
379
|
-
export function reflectAll<T, E = Error>(tasks: Array<AsyncFunction<T, E>>): Array<(callback: (err: null, result: {error?: E, value?: T}) => void) => void>;
|
|
411
|
+
export function reflect<T, E = Error>(fn: AsyncFunction<T, E>): (callback: (err: null, result: {error?: E | undefined, value?: T | undefined}) => void) => void;
|
|
412
|
+
export function reflectAll<T, E = Error>(tasks: Array<AsyncFunction<T, E>>): Array<(callback: (err: null, result: {error?: E | undefined, value?: T | undefined}) => void) => void>;
|
|
380
413
|
|
|
381
414
|
export function timeout<T, E = Error>(fn: AsyncFunction<T, E>, milliseconds: number, info?: any): AsyncFunction<T, E>;
|
|
382
415
|
export function timeout<T, R, E = Error>(fn: AsyncResultIterator<T, R, E>, milliseconds: number, info?: any): AsyncResultIterator<T, R, E>;
|
async/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/async",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.10",
|
|
4
4
|
"description": "TypeScript definitions for Async",
|
|
5
|
+
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/async",
|
|
5
6
|
"license": "MIT",
|
|
6
7
|
"contributors": [
|
|
7
8
|
{
|
|
@@ -48,6 +49,11 @@
|
|
|
48
49
|
"name": "Tümay Çeber",
|
|
49
50
|
"url": "https://github.com/brendtumi",
|
|
50
51
|
"githubUsername": "brendtumi"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"name": "Andrew Pensinger",
|
|
55
|
+
"url": "https://github.com/apnsngr",
|
|
56
|
+
"githubUsername": "apnsngr"
|
|
51
57
|
}
|
|
52
58
|
],
|
|
53
59
|
"main": "",
|
|
@@ -59,6 +65,6 @@
|
|
|
59
65
|
},
|
|
60
66
|
"scripts": {},
|
|
61
67
|
"dependencies": {},
|
|
62
|
-
"typesPublisherContentHash": "
|
|
63
|
-
"typeScriptVersion": "3.
|
|
68
|
+
"typesPublisherContentHash": "59988f58dbf614557dca35731704e62c7ac12321c056e72f522cfca75059a6c9",
|
|
69
|
+
"typeScriptVersion": "3.7"
|
|
64
70
|
}
|