1 | // Type definitions for asap 2.0
|
2 | // Project: https://github.com/kriskowal/asap
|
3 | // Definitions by: fpascutti <https://github.com/fpascutti>
|
4 | // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
5 |
|
6 | interface Task {
|
7 | call(...args: any[]): any;
|
8 | }
|
9 |
|
10 | /**
|
11 | * Executes a task as soon as possible.
|
12 | * @param task Function or any object that implements `call()`.
|
13 | */
|
14 | declare function asap(task: Task): void;
|
15 | export = asap;
|