@farris/devkit-vue
Version:
43 lines (42 loc) • 882 B
TypeScript
import { CommandContext } from '../command-context';
import { TaskFlowContext } from './task-flow-context';
import { TaskFunc } from './task-node';
import { TaskLink } from './task-link';
/**
* 任务流
*/
declare class TaskFlow {
/**
* 上下文
*/
private context;
/**
* 任务节点
*/
private taskNodes;
/**
* 构造函数
*/
constructor(commandContext: CommandContext);
/**
* 执行任务流
*/
execute(): Promise<any>;
/**
* 添加任务
*/
addTask(taskName: string, taskFunc: TaskFunc, taskLinks: TaskLink[]): void;
/**
* 获取开始任务
*/
private getFistTask;
/**
* 获取下一个任务
*/
private getNextTask;
/**
* 构造上下文
*/
buildContext(commandContext: CommandContext): TaskFlowContext;
}
export { TaskFlow };