blob: 4813ef613b8b49a5f8250a07fb2bcb41086e7a50 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
import { defer } from "./core";
export interface QueuedTask {
task: any | Task,
args: any[],
deferred: any, // should be defer, but not working
promise: Promise<any>
}
export default class Queue {
constructor(context: any);
enqueue(func: Promise<Function> | Function, ...args: any[]): Promise<any>;
dequeue(): Promise<QueuedTask>;
dump(): void;
run(): Promise<void>;
flush(): Promise<void>;
clear(): void;
length(): number;
pause(): void;
stop(): void;
}
declare class Task {
constructor(task: any, args: any[], context: any);
}
|