## eventBus API

### 监听事件

on: (event, callback) => void

| Name     | Description | Type               | Default      |
| -------- | ----------- | ------------------ | ------------ |
| event    | 事件名称    | `EventName`        | `(required)` |
| callback | 回调函数    | `(arg: A) => void` | `(required)` |

### 监听一次事件

once: (event, callback) => void

| Name     | Description | Type               | Default      |
| -------- | ----------- | ------------------ | ------------ |
| event    | 事件名称    | `EventName`        | `(required)` |
| callback | 回调函数    | `(arg: A) => void` | `(required)` |

### 触发事件

emit: (event, arg, replay) => void

| Name   | Description  | Type               | Default      |
| ------ | ------------ | ------------------ | ------------ |
| event  | 事件名称     | `EventName`        | `(required)` |
| arg    | 回调函数     | `EventArgument<N>` | `(required)` |
| replay | 是否重放该值 | `boolean`          | `false`      |

### 重设缓冲值

resetReplayValue: (event) => void

| Name  | Description | Type        | Default      |
| ----- | ----------- | ----------- | ------------ |
| event | 事件名称    | `EventName` | `(required)` |

### 监听新的订阅者

onSubscriber: (event, callback) => void

| Name     | Description | Type                                   | Default      |
| -------- | ----------- | -------------------------------------- | ------------ |
| event    | 事件名称    | `EventName`                            | `(required)` |
| callback | 回调函数    | `(listener: (arg: A) => void) => void` | `(required)` |
