Options
All
  • Public
  • Public/Protected
  • All
Menu

This class is used for all helferlein events to prevent contamination of the global event system

Hierarchy

  • EventBus

Index

Constructors

constructor

Methods

Static bind

  • Binds a given listener to a certain event

    Parameters

    • event: string
    • listener: EventEmitterEventListener
    • Optional priority: number

      Default: 0, the lower the number, the earlier the execution. May be a negative value!

    Returns void

Static emit

Static emitHook

  • Hooks are quite similar to events and share the same namespace with them. They however have one distinct difference when it comes to their handling. Events are called async, you emit an event and go on. A hook however waits for the registered listeners to finish and allows them to process the given arguments. All listeners are executed in sequence, even if they are async and return a promise object.

    Therefore this method will always return a promise object you have to wait for.

    see

    EventEmitter.emitHook()

    Parameters

    Returns Promise<PlainObject<any>>

Static getEmitter

Static unbind

Static unbindAll

  • unbindAll(event?: string): void
  • Unbinds either all listeners of a single event, or all listeners for all events

    Parameters

    • Optional event: string

    Returns void

Generated using TypeDoc