public emit(event: string, args?: Array<any>): any
Execute each of the listeners that may be listening for the specified event name
in order with the list of arguments.
Parameters
event: string
args?: Array<any>optional
Returns
any
public listeners(event: string): Array<Function>
Returns an array of listeners for the specified event.
This array can be manipulated, e.g. to remove listeners.
Parameters
event: string
Returns
Array<Function>
public listenersAny(): Array<Function>
Returns an array of listeners that are listening for any event that is specified.
This array can be manipulated, e.g. to remove listeners.
Returns
Array<Function>
public many(event: string, timesToListen: number, listener: Function): EventModule
Adds a listener that will execute n times for the event before being removed.
The listener is invoked only the first time the event is fired, after which it is removed.
By default EventEmitters will print a warning if more than 10 listeners are added to it.
This is a useful default which helps finding memory leaks. Obviously not all Emitters
should be limited to 10. This function allows that to be increased.