1
0
Fork 0
mirror of https://github.com/futurepress/epub.js.git synced 2025-10-02 14:49:16 +02:00
epub.js/types/utils/queue.d.ts
Valdrin Trena 7c7c554ee7 Lint
2024-06-08 20:23:19 +02:00

24 lines
531 B
TypeScript

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);
}