Class TypedEventTarget<Events>

Type-safe EventTarget.

Type Parameters

Hierarchy

  • EventTarget
    • TypedEventTarget

    Implements

    Constructors

    • Type Parameters

      Returns TypedEventTarget<Events>

    Methods

    • Dispatches the event to the list of handlers for event.type.

      Type Parameters

      • K extends string

      Parameters

      • event: Extract<Events[keyof Events], TypedEvent<K>>

      Returns boolean

      false if event is cancelled; true otherwise.

    Generated using TypeDoc