MCPcopy
hub / github.com/alibaba/lowcode-engine / emit

Method emit

packages/shell/src/api/event.ts:68–74  ·  view source on GitHub ↗

* 触发事件 * @param event 事件名称 * @param args 事件参数 * @returns

(event: string, ...args: any[])

Source from the content-addressed store, hash-verified

66 * @returns
67 */
68 emit(event: string, ...args: any[]) {
69 if (!this.options.prefix) {
70 logger.warn('Event#emit has been forbidden while prefix is not specified');
71 return;
72 }
73 this[eventBusSymbol].emit(`${this.options.prefix}:${event}`, ...args);
74 }
75
76 /**
77 * DO NOT USE if u fully understand what this method does.

Callers

nothing calls this directly

Calls 2

warnMethod · 0.65
emitMethod · 0.65

Tested by

no test coverage detected