docs: fix incorrect content for emit method in event api

This commit is contained in:
kit101 2023-03-09 14:04:47 +08:00 committed by GitHub
parent f3f7703f98
commit f6800be0e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 5 deletions

View File

@ -43,12 +43,13 @@ off(event: string, listener: (...args: any[]) => void): void;
```typescript ```typescript
/** /**
* 取消监听事件 * 触发事件
* cancel a monitor from a event * emit a message for a event
* @param event 事件名称 * @param event 事件名称
* @param listener 事件回调 * @param args 事件参数
* @returns
*/ */
off(event: string, listener: (...args: any[]) => void): void; emit(event: string, ...args: any[]): void;
``` ```
## 使用示例 ## 使用示例

View File

@ -21,7 +21,7 @@ export interface IPublicApiEvent {
/** /**
* *
* emit a message fot a event * emit a message for a event
* @param event * @param event
* @param args * @param args
* @returns * @returns