@types/async 3.2.25 → 3.2.26
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 +1 -1
- async/index.d.ts +10 -5
- 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:
|
|
11
|
+
* Last updated: Wed, 09 Sep 2026 17:32:37 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
|
|
14
14
|
# Credits
|
async/index.d.ts
CHANGED
|
@@ -125,26 +125,30 @@ export interface QueueObject<T> {
|
|
|
125
125
|
* Instead of a single task, a tasks array can be submitted.
|
|
126
126
|
* The respective callback is used for every task in the list.
|
|
127
127
|
*/
|
|
128
|
-
push<R>(task: T
|
|
128
|
+
push<R>(task: T): Promise<R>;
|
|
129
|
+
push<R>(task: T[]): Promise<R>[] | undefined;
|
|
129
130
|
push<R, E = Error>(task: T | T[], callback: AsyncResultCallback<R, E>): void;
|
|
130
131
|
|
|
131
132
|
/**
|
|
132
133
|
* Add a new task to the front of the queue
|
|
133
134
|
*/
|
|
134
|
-
unshift<R>(task: T
|
|
135
|
+
unshift<R>(task: T): Promise<R>;
|
|
136
|
+
unshift<R>(task: T[]): Promise<R>[] | undefined;
|
|
135
137
|
unshift<R, E = Error>(task: T | T[], callback: AsyncResultCallback<R, E>): void;
|
|
136
138
|
|
|
137
139
|
/**
|
|
138
140
|
* The same as `q.push`, except this returns a promise that rejects if an error occurs.
|
|
139
141
|
* The `callback` arg is ignored
|
|
140
142
|
*/
|
|
141
|
-
pushAsync<R>(task: T
|
|
143
|
+
pushAsync<R>(task: T): Promise<R>;
|
|
144
|
+
pushAsync<R>(task: T[]): Promise<R>[] | undefined;
|
|
142
145
|
|
|
143
146
|
/**
|
|
144
147
|
* The same as `q.unshift`, except this returns a promise that rejects if an error occurs.
|
|
145
148
|
* The `callback` arg is ignored
|
|
146
149
|
*/
|
|
147
|
-
unshiftAsync<R>(task: T
|
|
150
|
+
unshiftAsync<R>(task: T): Promise<R>;
|
|
151
|
+
unshiftAsync<R>(task: T[]): Promise<R>[] | undefined;
|
|
148
152
|
|
|
149
153
|
/**
|
|
150
154
|
* Remove items from the queue that match a test function.
|
|
@@ -239,7 +243,8 @@ export interface QueueObject<T> {
|
|
|
239
243
|
*/
|
|
240
244
|
// FIXME: can not use Omit due to ts version restriction. Replace Pick with Omit, when ts 3.5+ will be allowed
|
|
241
245
|
export interface AsyncPriorityQueue<T> extends Pick<QueueObject<T>, Exclude<keyof QueueObject<T>, "push" | "unshift">> {
|
|
242
|
-
push<R>(task: T
|
|
246
|
+
push<R>(task: T, priority?: number): Promise<R>;
|
|
247
|
+
push<R>(task: T[], priority?: number): undefined | Promise<R>[];
|
|
243
248
|
push<R, E = Error>(task: T | T[], priority: number, callback: AsyncResultCallback<R, E>): void;
|
|
244
249
|
}
|
|
245
250
|
|
async/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/async",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.26",
|
|
4
4
|
"description": "TypeScript definitions for async",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/async",
|
|
6
6
|
"license": "MIT",
|
|
@@ -56,6 +56,6 @@
|
|
|
56
56
|
"scripts": {},
|
|
57
57
|
"dependencies": {},
|
|
58
58
|
"peerDependencies": {},
|
|
59
|
-
"typesPublisherContentHash": "
|
|
60
|
-
"typeScriptVersion": "5.
|
|
59
|
+
"typesPublisherContentHash": "dec5da0bd45e207433d691e0700576c19c19470ddc6dbf0ff0432ad0426fb154",
|
|
60
|
+
"typeScriptVersion": "5.6"
|
|
61
61
|
}
|