type Action = (...args: any[]) => Promise<any>;
type Task = {
    uuid: string;
    type: string;
    actionParams?: Record<string, any>;
};
declare class Tasks {
    private actions;
    private taskQueue;
    isRunning: boolean;
    constructor(actions?: Map<string, Action>);
    /**
     * 清空所有任务
     */
    clear(): void;
    /**
     * 清空任务执行队列
     */
    clearTaskQueue(): void;
    /**
     * 添加action
     * @param name action名称
     * @param action action函数
     */
    addAction(name: string, action: Action): void;
    /**
     * 添加任务
     * @param task 任务
     */
    addTask(task: Task): void;
    /**
     * 执行任务
     */
    run(): Promise<void>;
    /**
     * 判定当前的任务是否依然存在
     */
    isTaskExist(uuid: string): boolean;
}
export default Tasks;
