EventEmitter.removeAllListeners() method
Removes all listeners. If given an event argument, it will remove only listeners for that event.
Signature:removeAllListeners(event?: EventType): EventEmitter;
Parameters
Parameter | Type | Description |
---|---|---|
event | EventType | (Optional) the event to remove listeners for. |
this
to enable you to chain method calls.