Constructors
Methods
emit
- emit<K>(event, ...args): void
Type Parameters
- K extends string | number | symbol
Parameters
- event: K
Rest
...args: Parameters<T[K]>
Returns void
off
- off<K>(event, listener): void
Type Parameters
- K extends string | number | symbol = string
Returns void
on
- on<K>(event, listener): (() => void)
Type Parameters
- K extends string | number | symbol = string
Returns (() => void)
once
- once<K>(event, listener?): Promise<any>
Type Parameters
- K extends string | number | symbol = string
Parameters
- event: K
Optional
listener: T[K]
Returns Promise<any>
Static
emit
- emit(event, ...args): void
Parameters
- event: any
Rest
...args: any[]
Returns void
Static
off
- off(event, listener): void
Returns void
Static
on
- on(event, listener): (() => void)
Returns (() => void)
Static
once
- once(event, listener?): Promise<any>
Returns Promise<any>