Main event class for Baklava

Type Parameters

  • T
  • E

Hierarchy (view full)

Constructors

Properties

entity: E

Accessors

Methods

  • Invoke all listeners

    Parameters

    • data: T

      The data to invoke the listeners with.

    Returns void

  • Subscribe to the event / hook

    Parameters

    • token: any

      A token that can be used to unsubscribe from the event / hook later on

    • callback: EventListener<T, E>

      A callback that will be invoked when the event / hook occurs

    Returns void

  • Remove a listener

    Parameters

    • token: any

      The token that was specified when subscribing to the listener. An invalid token does not result in an error.

    Returns void