Class EventEmitter

Hierarchy

Constructors

  • Returns EventEmitter

Properties

prefixed: string | boolean

Methods

  • Type Parameters

    Parameters

    Returns this

  • Return an array listing the events for which the emitter has registered listeners.

    Returns (keyof EventPayloadMap)[]

  • Return the number of listeners listening to a given event.

    Parameters

    Returns number

  • Type Parameters

    Parameters

    Returns this

  • Add a listener for a given event.

    Type Parameters

    Parameters

    Returns this

  • Add a one-time listener for a given event.

    Type Parameters

    Parameters

    Returns this

  • Remove all listeners, or those of the specified event.

    Parameters

    • Optionalevent: keyof EventPayloadMap

    Returns this

  • Remove the listeners of a given event.

    Type Parameters

    Parameters

    Returns this