EventEmitter.addListener() method
Warning: This API is now obsolete.
please use EventEmitter.on() instead.
Add an event listener.
Signature:
class EventEmitter {
addListener<Key extends keyof EventsWithWildcard<Events>>(
type: Key,
handler: Handler<EventsWithWildcard<Events>[Key]>
): this;
}
Parameters
Parameter | Type | Description |
---|---|---|
type | Key | |
handler | Handler<EventsWithWildcard<Events>[Key]> |
Returns:
this