Class EventEmitter<Events>
Constructors
Properties
Methods
emit
- emit<Key extends string | number | symbol>(
type: Key,
...payload: _ToTuple<Events[Key]>,
): void Type Parameters
- Key extends string | number | symbol
Returns void
off
- off<Key extends string | number | symbol>(
type: Key,
handler?: _Handler<Events[Key]>,
): void Type Parameters
- Key extends string | number | symbol
Returns void
- off(): void
Returns void
Event emitter class.