Skip to content

Commit

Permalink
docs: fix incorrect content for emit method in event api
Browse files Browse the repository at this point in the history
  • Loading branch information
kit101 authored and JackLian committed Mar 9, 2023
1 parent 88961aa commit 53ada7b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions docs/docs/api/event.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,13 @@ off(event: string, listener: (...args: any[]) => void): void;

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

## 使用示例
Expand Down
2 changes: 1 addition & 1 deletion packages/types/src/shell/api/event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export interface IPublicApiEvent {

/**
* 触发事件
* emit a message fot a event
* emit a message for a event
* @param event 事件名称
* @param args 事件参数
* @returns
Expand Down

0 comments on commit 53ada7b

Please sign in to comment.