• Adds a single handler to all given event types on an event host.

    Type Parameters

    • EventMap
    • K extends string | number | symbol

    Parameters

    • host: ReadonlyEventHost<EventMap>

      The event host.

    • types: readonly K[]

      An array of event types.

    • handler: (<U>(event: EventMap[U], type: U) => void)

      A handler to be called if any of the given event types are dispatched.

        • <U>(event, type): void
        • Type Parameters

          • U extends string | number | symbol

          Parameters

          Returns void

    • Optionaloptions: SignalOptions

      If once is true, the first event called will remove the handler.

    Returns Unsubscribe