The events list type
Emit event. The event listeners will be called asynchronously in parallel.
You can await this method to wait for events listeners to finish
Promise that resolves when all listeners finish
Emit events serially. The event listeners will be called asynchronously in the same sequence as they are registered.
You can await this method to wait for events listeners to finish
Promise that resolves when all listeners finish
Get count of listeners for a given event or all the events
Optionalevent: Constructor<any> | keyof EventsListThe event to count listeners for (optional)
The number of listeners
Find if an event has one or more listeners
Optionalevent: Constructor<any> | keyof EventsListThe event to check listeners for (optional)
True if the event has listeners
The EmitterLike interface exposes a less strict API to accept emitter as an argument to emit events.