Options
All
  • Public
  • Public/Protected
  • All
Menu

Class EventManager

EventManager for node-platform, you can extend it to create your own EventManager

Hierarchy

  • any
    • EventManager

Index

Constructors

Methods

Constructors

constructor

  • new EventManager(events: any, name?: string): EventManager

Methods

emit

  • emit(event: symbol, ...args: any[]): Promise<EventManager>
  • Parameters

    • event: symbol

      Symbol of the event to emit

    • Rest ...args: any[]

      list of arguments to pass to the event separated by comma

    Returns Promise<EventManager>

    • Return a promise that the event will be completed

on

  • instance

    Parameters

    • event: symbol

      Symbol of the event to register on

    • listener: {}

      Callback function that will be called when the emit will be emitted

    Returns EventManager

    • Returns the EventManager instance to eventually continue with the chain

Generated using TypeDoc