@types/async 3.2.15 → 3.2.17

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 (3) hide show
  1. async/README.md +1 -1
  2. async/index.d.ts +14 -13
  3. async/package.json +3 -3
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: Wed, 06 Jul 2022 10:02:22 GMT
11
+ * Last updated: Wed, 15 Feb 2023 02:02:38 GMT
12
12
  * Dependencies: none
13
13
  * Global values: `async`
14
14
 
async/index.d.ts CHANGED
@@ -15,7 +15,7 @@
15
15
  export as namespace async;
16
16
 
17
17
  export interface Dictionary<T> { [key: string]: T; }
18
- export type IterableCollection<T> = T[] | IterableIterator<T> | Dictionary<T>;
18
+ export type IterableCollection<T> = T[] | IterableIterator<T> | AsyncIterable<T> | Dictionary<T>;
19
19
 
20
20
  export interface ErrorCallback<E = Error> { (err?: E | null): void; }
21
21
  export interface AsyncBooleanResultCallback<E = Error> { (err?: E | null, truthValue?: boolean): void; }
@@ -247,12 +247,12 @@ export const eachOf: typeof forEachOf;
247
247
  export const eachOfSeries: typeof forEachOf;
248
248
  export const eachOfLimit: typeof forEachOfLimit;
249
249
  export function map<T, R, E = Error>(
250
- arr: T[] | IterableIterator<T> | Dictionary<T>,
250
+ arr: IterableCollection<T>,
251
251
  iterator: (AsyncResultIterator<T, R, E> | AsyncResultIteratorPromise<T, R>),
252
252
  callback: AsyncResultArrayCallback<R, E>
253
253
  ): void;
254
254
  export function map<T, R, E = Error>(
255
- arr: T[] | IterableIterator<T> | Dictionary<T>,
255
+ arr: IterableCollection<T>,
256
256
  iterator: (AsyncResultIterator<T, R, E> | AsyncResultIteratorPromise<T, R>)
257
257
  ): Promise<R[]>;
258
258
 
@@ -308,9 +308,9 @@ export const find: typeof detect;
308
308
  export const findSeries: typeof detect;
309
309
  export const findLimit: typeof detectLimit;
310
310
  export function sortBy<T, V, E = Error>(arr: T[] | IterableIterator<T>, iterator: AsyncResultIterator<T, V, E>, callback: AsyncResultArrayCallback<T, E>): void;
311
- export function sortBy<T, V, E = Error>(arr: T[] | IterableIterator<T>, iterator: AsyncResultIterator<T, V, E>):
312
- Promise<T[]>;
313
- export function some<T, E = Error>(arr: IterableCollection<T>, iterator: AsyncBooleanIterator<T, E>, callback?: AsyncBooleanResultCallback<E>): void;
311
+ export function sortBy<T, V, E = Error>(arr: T[] | IterableIterator<T>, iterator: AsyncResultIterator<T, V, E>): Promise<T[]>;
312
+ export function some<T, E = Error>(arr: IterableCollection<T>, iterator: AsyncBooleanIterator<T, E>, callback: AsyncBooleanResultCallback<E>): void;
313
+ export function some<T, E = Error>(arr: IterableCollection<T>, iterator: AsyncBooleanIterator<T, E>): Promise<boolean>;
314
314
  export const someSeries: typeof some;
315
315
  export function someLimit<T, E = Error>(arr: IterableCollection<T>, limit: number, iterator: AsyncBooleanIterator<T, E>, callback?: AsyncBooleanResultCallback<E>): void;
316
316
  export const any: typeof some;
@@ -341,14 +341,15 @@ export function groupByLimit<T, K, E = Error>(iterable: IterableCollection<T>, l
341
341
  export const groupBySeries: typeof groupBy;
342
342
 
343
343
  // Control Flow
344
- export function series<T, E = Error>(tasks: Array<AsyncFunction<T, E>>, callback?: AsyncResultArrayCallback<T, E>): void;
345
- export function series<T, E = Error>(tasks: Dictionary<AsyncFunction<T, E>>, callback?: AsyncResultObjectCallback<T, E>): void;
346
- export function series<T, R, E = Error>(tasks: Array<AsyncFunction<T, E>> | Dictionary<AsyncFunction<T, E>>): Promise<R>;
347
- export function parallel<T, E = Error>(tasks: Array<AsyncFunction<T, E>>, callback?: AsyncResultArrayCallback<T, E>): void;
348
- export function parallel<T, E = Error>(tasks: Dictionary<AsyncFunction<T, E>>, callback?: AsyncResultObjectCallback<T, E>): void;
344
+ export function series<T, E = Error>(tasks: Array<AsyncFunction<T, E>>, callback: AsyncResultArrayCallback<T, E>): void;
345
+ export function series<T, E = Error>(tasks: Dictionary<AsyncFunction<T, E>>, callback: AsyncResultObjectCallback<T, E>): void;
346
+ export function series<T, E = Error>(tasks: Array<AsyncFunction<T, E>>): Promise<T[]>;
347
+ export function series<T, E = Error>(tasks: Dictionary<AsyncFunction<T, E>>): Promise<Dictionary<T>>;
348
+ export function parallel<T, E = Error>(tasks: Array<AsyncFunction<T, E>>, callback: AsyncResultArrayCallback<T, E>): void;
349
+ export function parallel<T, E = Error>(tasks: Dictionary<AsyncFunction<T, E>>, callback: AsyncResultObjectCallback<T, E>): void;
349
350
  export function parallel<T, R, E = Error>(tasks: Array<AsyncFunction<T, E>> | Dictionary<AsyncFunction<T, E>>): Promise<R>;
350
- export function parallelLimit<T, E = Error>(tasks: Array<AsyncFunction<T, E>>, limit: number, callback?: AsyncResultArrayCallback<T, E>): void;
351
- export function parallelLimit<T, E = Error>(tasks: Dictionary<AsyncFunction<T, E>>, limit: number, callback?: AsyncResultObjectCallback<T, E>): void;
351
+ export function parallelLimit<T, E = Error>(tasks: Array<AsyncFunction<T, E>>, limit: number, callback: AsyncResultArrayCallback<T, E>): void;
352
+ export function parallelLimit<T, E = Error>(tasks: Dictionary<AsyncFunction<T, E>>, limit: number, callback: AsyncResultObjectCallback<T, E>): void;
352
353
  export function parallelLimit<T, R, E = Error>(tasks: Array<AsyncFunction<T, E>> | Dictionary<AsyncFunction<T, E>>, limit: number): Promise<R>;
353
354
 
354
355
  export function whilst<T, E = Error>(
async/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/async",
3
- "version": "3.2.15",
3
+ "version": "3.2.17",
4
4
  "description": "TypeScript definitions for Async",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/async",
6
6
  "license": "MIT",
@@ -60,6 +60,6 @@
60
60
  },
61
61
  "scripts": {},
62
62
  "dependencies": {},
63
- "typesPublisherContentHash": "bbb8223de20daa7212242cc87e7884633b39451ecdc4548a2fa3491af982d801",
64
- "typeScriptVersion": "4.0"
63
+ "typesPublisherContentHash": "f02a41db25d14044f4927f9e059eb3c73b12239aece63dcf8259caeb80bafe64",
64
+ "typeScriptVersion": "4.2"
65
65
  }