Interface EventDispatcher<TEventMap>

Dispatches events that are fired.

interface EventDispatcher<TEventMap> {
    addEventListener<TType>(type, listener): void;
    removeEventListener<TType>(type, listener): void;
}

Type Parameters

Hierarchy (view full)

Implemented by

Methods

  • Add the given listener for the given event type(s).

    Type Parameters

    • TType extends string

    Parameters

    Returns void

  • Remove the given listener for the given event type(s).

    Type Parameters

    • TType extends string

    Parameters

    Returns void