@types/async 3.2.5 → 3.2.9
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/LICENSE +0 -0
- async/README.md +1 -1
- async/index.d.ts +26 -19
- async/package.json +4 -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,
|
|
11
|
+
* Last updated: Mon, 25 Oct 2021 23:31:43 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
* Global values: `async`
|
|
14
14
|
|
async/index.d.ts
CHANGED
|
@@ -302,7 +302,8 @@ export const allSeries: typeof every;
|
|
|
302
302
|
export const allLimit: typeof everyLimit;
|
|
303
303
|
|
|
304
304
|
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
|
|
305
|
+
export function concatLimit<T, R, E = Error>(arr: IterableCollection<T>, limit: number, iterator: AsyncResultIterator<T, R[], E>, callback: AsyncResultArrayCallback<R, E>): void;
|
|
306
|
+
export function concatLimit<T, R, E = Error>(arr: IterableCollection<T>, limit: number, iterator: AsyncResultIterator<T, R[], E>): Promise<R[]>;
|
|
306
307
|
export const concatSeries: typeof concat;
|
|
307
308
|
|
|
308
309
|
// Control Flow
|
|
@@ -340,38 +341,44 @@ export function cargoQueue<T, E = Error>(
|
|
|
340
341
|
concurrency?: number,
|
|
341
342
|
payload?: number,
|
|
342
343
|
): 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
|
|
344
|
+
export function auto<R extends Dictionary<any>, E = Error>(tasks: AsyncAutoTasks<R, E>, concurrency?: number): Promise<R>;
|
|
345
|
+
export function auto<R extends Dictionary<any>, E = Error>(tasks: AsyncAutoTasks<R, E>, concurrency: number, callback: AsyncResultCallback<R, E>): void;
|
|
346
|
+
export function auto<R extends Dictionary<any>, E = Error>(tasks: AsyncAutoTasks<R, E>, callback: AsyncResultCallback<R, E>): void;
|
|
345
347
|
export function autoInject<E = Error>(tasks: any, callback?: AsyncResultCallback<any, E>): void;
|
|
346
348
|
|
|
347
|
-
export interface RetryOptions {
|
|
348
|
-
times?: number;
|
|
349
|
-
interval?: number | ((retryCount: number) => number);
|
|
350
|
-
errorFilter?: (error:
|
|
349
|
+
export interface RetryOptions<E> {
|
|
350
|
+
times?: number | undefined;
|
|
351
|
+
interval?: number | ((retryCount: number) => number) | undefined;
|
|
352
|
+
errorFilter?: ((error: E) => boolean) | undefined;
|
|
351
353
|
}
|
|
352
354
|
export function retry<T, E = Error>(
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
): Promise<void>;
|
|
355
|
+
task: (() => Promise<T>) | ((callback: AsyncResultCallback<T, E>) => void),
|
|
356
|
+
): Promise<T>;
|
|
356
357
|
export function retry<T, E = Error>(
|
|
357
|
-
opts
|
|
358
|
-
task
|
|
359
|
-
|
|
358
|
+
opts: number | RetryOptions<E>,
|
|
359
|
+
task: (() => Promise<T>) | ((callback: AsyncResultCallback<T, E>) => void),
|
|
360
|
+
): Promise<T>;
|
|
361
|
+
export function retry<T, E = Error>(
|
|
362
|
+
task: (() => Promise<T>) | ((callback: AsyncResultCallback<T, E>) => void),
|
|
363
|
+
callback: AsyncResultCallback<T, E>,
|
|
364
|
+
): void;
|
|
365
|
+
export function retry<T, E = Error>(
|
|
366
|
+
opts: number | RetryOptions<E>,
|
|
367
|
+
task: (() => Promise<T>) | ((callback: AsyncResultCallback<T, E>) => void),
|
|
368
|
+
callback: AsyncResultCallback<T, E>,
|
|
360
369
|
): void;
|
|
361
370
|
|
|
362
371
|
export function retryable<T, E = Error>(task: AsyncFunction<T, E>): AsyncFunction<T, E>;
|
|
363
372
|
export function retryable<T, E = Error>(
|
|
364
|
-
opts:
|
|
365
|
-
|
|
366
|
-
| RetryOptions & {arity?: number},
|
|
367
|
-
task: AsyncFunction<T, E>
|
|
373
|
+
opts: number | (RetryOptions<E> & { arity?: number | undefined }),
|
|
374
|
+
task: AsyncFunction<T, E>,
|
|
368
375
|
): AsyncFunction<T, E>;
|
|
369
376
|
export function apply<E = Error>(fn: Function, ...args: any[]): AsyncFunction<any, E>;
|
|
370
377
|
export function nextTick(callback: Function, ...args: any[]): void;
|
|
371
378
|
export const setImmediate: typeof nextTick;
|
|
372
379
|
|
|
373
|
-
export function reflect<T, E = Error>(fn: AsyncFunction<T, E>): (callback: (err: null, result: {error?: E, value?: T}) => void) => void;
|
|
374
|
-
export function reflectAll<T, E = Error>(tasks: Array<AsyncFunction<T, E>>): Array<(callback: (err: null, result: {error?: E, value?: T}) => void) => void>;
|
|
380
|
+
export function reflect<T, E = Error>(fn: AsyncFunction<T, E>): (callback: (err: null, result: {error?: E | undefined, value?: T | undefined}) => void) => void;
|
|
381
|
+
export function reflectAll<T, E = Error>(tasks: Array<AsyncFunction<T, E>>): Array<(callback: (err: null, result: {error?: E | undefined, value?: T | undefined}) => void) => void>;
|
|
375
382
|
|
|
376
383
|
export function timeout<T, E = Error>(fn: AsyncFunction<T, E>, milliseconds: number, info?: any): AsyncFunction<T, E>;
|
|
377
384
|
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.9",
|
|
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
|
{
|
|
@@ -59,6 +60,6 @@
|
|
|
59
60
|
},
|
|
60
61
|
"scripts": {},
|
|
61
62
|
"dependencies": {},
|
|
62
|
-
"typesPublisherContentHash": "
|
|
63
|
-
"typeScriptVersion": "3.
|
|
63
|
+
"typesPublisherContentHash": "3c13f25d612c145c9116a228ba5391d96870617945c1981226a0774dc0a98be9",
|
|
64
|
+
"typeScriptVersion": "3.7"
|
|
64
65
|
}
|