Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface EventsContext

Interface representing global events context. There should be exactly one instance implementing this interface in the whole application.

Hierarchy

  • EventsContext

Properties

Properties

Readonly emit

emit: function

Emits given event with following arguments

param

Event which should be emitted

param

Arguments which will be sent to the functions subscribed to this event

Type declaration

    • (event: Events, ...args: any[]): boolean
    • Parameters

      • event: Events
      • Rest ...args: any[]

      Returns boolean

Readonly off

off: function

Unsubscribe from given event

param

Event for unsubscription

param

Function which should be unsubscribed from the event

Type declaration

    • (event: Events, fn: function): void
    • Parameters

      • event: Events
      • fn: function
          • (...args: any[]): void
          • Parameters

            • Rest ...args: any[]

            Returns void

      Returns void

Readonly on

on: function

Subscribe to given event

param

Event for subscription

param

Function which is called when the event is emitted

Type declaration

    • (event: Events, fn: function): void
    • Parameters

      • event: Events
      • fn: function
          • (...args: any[]): void
          • Parameters

            • Rest ...args: any[]

            Returns void

      Returns void

Generated using TypeDoc