/** * Force run all pending tasks * Useful for testing purposes * @returns {void} */ declare const flush: () => void; /** * A utility class to create Task */ declare class Task { /** * Callback function */ readonly callback: () => void; private args; /** * Create the new task * @param callback The callback to execute */ constructor(callback: () => void, ...args: unknown[]); /** * Immediately fulfil the callback * @returns {void} */ fulfil(): void; /** * Cancel the task * @returns {void} */ cancel(): void; } type TaskClass = typeof Task; type TaskCallback = () => void; export { Task, TaskClass, TaskCallback, flush };