Check if the object has any listeners attached to it.
True if the object has listeners, false otherwise.
Emits the given event with the specified arguments.
The name of the event to emit.
Rest
...args: any[]The arguments to pass to the event listeners.
Subscribes a callback function to the given event name. The callback function will be triggered only once when the event is emitted.
The name of the event to subscribe to.
The callback function to be executed when the event is emitted.
Class representing an event emitter.