Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BaseEvents

Base class with events.

Hierarchy

  • BaseEvents

Index

Properties

Methods

Properties

events

events: EventEmitter = new EventEmitter()

Event emitter.

Methods

off

  • off(eventName: string, callback: ListenerFn): void
  • Unbind callback from event. Shortcut to events.off().

    Parameters

    • eventName: string

      The name of the event.

    • callback: ListenerFn

      Callback function.

    Returns void

on

  • on(eventName: string, callback: ListenerFn): void
  • Bind callback to event. Shortcut to events.on().

    Parameters

    • eventName: string

      The name of the event.

    • callback: ListenerFn

      Callback function.

    Returns void

once

  • once(eventName: string, callback: ListenerFn): void
  • Bind callback to event that will be triggered only once. Shortcut to events.once().

    Parameters

    • eventName: string

      The name of the event.

    • callback: ListenerFn

      Callback function.

    Returns void

Generated using TypeDoc