Photo Sphere Viewer
    Preparing search index...

    Class TypedEventTarget<TEvents>

    Decorator for EventTarget allowing to strongly type events and listeners

    Type Parameters

    • TEvents extends TypedEvent<any>

      union of dispatched events

    Hierarchy (View Summary)

    Index

    Constructors

    Methods

    • Type Parameters

      • T extends string

        the name of event

      • E extends TypedEvent<any> & { type: T }

        the class of the event

      Parameters

      • type: T
      • callback: EventListenerObject | ((e: E) => void)
      • Optionaloptions: boolean | AddEventListenerOptions

      Returns void

    • Type Parameters

      • T extends string

        the name of event

      • E extends TypedEvent<any> & { type: T }

        the class of the event

      Parameters

      • type: TEvents["type"]
      • callback: EventListenerObject | ((e: E) => void)
      • Optionaloptions: boolean | EventListenerOptions

      Returns void