UNPKG
p-queue
Version:
latest (9.3.0)
9.3.0
9.2.0
9.1.2
9.1.1
9.1.0
9.0.1
9.0.0
8.1.1
8.1.0
8.0.1
8.0.0
7.4.1
7.4.0
7.3.4
7.3.3
7.3.2
7.3.1
7.3.0
7.2.0
7.1.0
7.0.0
6.6.2
6.6.1
6.6.0
6.5.0
6.4.0
6.3.0
6.2.1
6.2.0
6.1.1
6.1.0
6.0.2
6.0.1
6.0.0
5.0.0
4.0.0
3.2.0
3.1.0
3.0.0
2.4.2
2.4.1
2.4.0
2.3.1
2.3.0
2.2.0
2.1.0
2.0.0
1.2.0
1.1.0
1.0.0
0.2.0
0.1.0
0.0.0
Promise queue with concurrency control
github.com/sindresorhus/p-queue
sindresorhus/p-queue
p-queue
/
dist
/
queue.d.ts
8 lines
(7 loc)
•
270 B
TypeScript
View Raw
1
2
3
4
5
6
7
8
export
type
RunFunction
=
() =>
Promise
<
unknown
>;
export
type
Queue
<
Element
,
Options
> = {
size
:
number
;
filter
:
(
options
:
Partial
<
Options
>
) =>
Element
[];
dequeue
:
() =>
Element
|
undefined
;
enqueue
:
(
run
:
Element
,
options
?:
Partial
<
Options
>
) =>
void
; };