StandardEventsOnMethod: <E extends StandardEventsNames>(
    event: E,
    listener: StandardEventsListeners[E],
) => () => void

Method to call to use the StandardEventsFeature.

Type declaration

    • <E extends StandardEventsNames>(
          event: E,
          listener: StandardEventsListeners[E],
      ): () => void
    • Type Parameters

      Parameters

      • event: E

        Event type to listen for. change is the only event type.

      • listener: StandardEventsListeners[E]

        Function that will be called when an event of the type is emitted.

      Returns () => void

      off function which may be called to remove the event listener and unsubscribe from events.

      As with all event listeners, be careful to avoid memory leaks.