1
0
Fork 0
mirror of https://github.com/futurepress/epub.js.git synced 2025-10-03 14:59:18 +02:00

Added type declarations

This commit is contained in:
Fred Chasen 2018-08-20 22:21:26 -07:00
parent 0da286b0a2
commit 6bfcd1e4eb
50 changed files with 1837 additions and 54 deletions

34
types/utils/queue.d.ts vendored Normal file
View file

@ -0,0 +1,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);
}