Type alias Listener<E, A, T>

Listener<E, A, T>: 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

Generated using TypeDoc