Type Alias Listener<E, A, T>

Listener: T extends E
    ? A[T]
    : T extends EventEmitterEvents
        ? EventEmitterErrorListener
        : EventEmitterEventListener

The expected type of a listener function for a particular event.

Type parameters:

  • E - List of all events emitted by the TypedEventEmitter. Normally an enum type.
  • A - A type providing mappings from event names to listener types.
  • T - The name of the actual event that this listener is for. Normally one of the types in E or EventEmitterEvents.

Type Parameters