Adds the specified listener function to the end of the listeners array for the event of the given type.
A case-sensitive string representing the event type to listen for.
The callback function.
A reference to the EventEmitter
.
Synchronously calls each of the listeners registered for the given event type, in the order they were registered, passing the supplied arguments.
Whether the event had listeners.
Removes the specified listener function from the listener array for the event of the given type.
A case-sensitive string representing the event type.
The callback function to unregister.
A reference to the EventEmitter
.
By default EventEmitter
s will print a warning if more than 10
listeners are added for a particular event.
Use this function to modify the default threshold.
Number of listeners before printing a warning.
The value can be set toInfinity
(or 0
) to indicate
an unlimited number of listeners.
A reference to the EventEmitter
.
Generated using TypeDoc
Typed event emitter that works both for Web and React Native.
Type Param