GeezerVison is showing github.com — docs: fix incorrect content for emit method in event api · Dicky-L/lowcode-engine@53ada7b
File tree
Expand file treeCollapse file tree
Open diff view settings
packages/types/src/shell/api
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: docs/docs/api/event.md +5-4Lines changed: 5 additions & 4 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -43,12 +43,13 @@ off(event: string, listener: (...args: any[]) => void): void; |
43 | 43 |
|
44 | 44 | ```typescript |
45 | 45 | /** |
46 | | - * 取消监听事件 |
47 | | - * cancel a monitor from a event |
| 46 | + * 触发事件 |
| 47 | + * emit a message for a event |
48 | 48 | * @param event 事件名称 |
49 | | - * @param listener 事件回调 |
| 49 | + * @param args 事件参数 |
| 50 | + * @returns |
50 | 51 | */ |
51 | | -off(event: string, listener: (...args: any[]) => void): void; |
| 52 | +emit(event: string, ...args: any[]): void; |
52 | 53 | ``` |
53 | 54 |
|
54 | 55 | ## 使用示例 |
|
Collapse file
Copy file name to clipboardExpand all lines: packages/types/src/shell/api/event.ts +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -21,7 +21,7 @@ export interface IPublicApiEvent { |
21 | 21 |
|
22 | 22 | /** |
23 | 23 | * 触发事件 |
24 | | - * emit a message fot a event |
| 24 | + * emit a message for a event |
25 | 25 | * @param event 事件名称 |
26 | 26 | * @param args 事件参数 |
27 | 27 | * @returns |
|