Skip to main content
EventEmitter.addListener - events - Node documentation
method EventEmitter.addListener

Usage in Deno

import { type EventEmitter } from "node:events";
EventEmitter.addListener<K>(
eventName: Key<K, T>,
listener: Listener1<K, T>,
): this

Alias for emitter.on(eventName, listener).

Type Parameters

K

Parameters

eventName: Key<K, T>
listener: Listener1<K, T>

Return Type

this