Vinyl
    Preparing search index...

    Function onAny

    • 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 extends string | number | symbol>(event: EventMap[U], type: U) => void

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

      • Optionaloptions: SignalOptions

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

      Returns Unsubscribe