Commit b5426e69 authored by timel's avatar timel

feat: add comment

parent 190e558d
Pipeline #22033 passed with stages
in 18 minutes and 48 seconds
......@@ -10,6 +10,7 @@ export enum Task {
const getEnd = (task: Task) => `${task}-end`;
/** 在组件之中注册方法 */
const register = (task: Task, fn: (...args: any[]) => Promise<any>) => {
eventEmitter.on(
task,
......@@ -20,6 +21,7 @@ const register = (task: Task, fn: (...args: any[]) => Promise<any>) => {
);
};
/** 在service之中调用组件中的方法 */
const call = (task: Task, ...args: any[]) =>
new Promise<void>((rs) => {
const taskId = v4uuid();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment