# Emitter Class
# Methods
# emit
▸ emit‹Event›(event: Event, ...args: Parameters‹Listeners[Event]›): this
Defined in src/Emitter.ts:328 (opens new window)
Type parameters:
▪ Event: keyof Listeners
Parameters:
| Name | Type |
|---|---|
event | Event |
...args | Parameters‹Listeners[Event]› |
Returns: this
# off
▸ off(event: string, callback?: Function): this
Parameters:
| Name | Type |
|---|---|
event | string |
callback? | Function |
Returns: this
# on
▸ on(event: string, callback: Function, ctx?: any): this
Parameters:
| Name | Type |
|---|---|
event | string |
callback | Function |
ctx? | any |
Returns: this
# once
▸ once(event: string, callback: Function, ctx?: any): this
Parameters:
| Name | Type |
|---|---|
event | string |
callback | Function |
ctx? | any |
Returns: this