Options
All
  • Public
  • Public/Protected
  • All
Menu

Class EventBus

Hierarchy

  • EventBus

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

callbacks

callbacks: Record<string, any[]> = {}

Methods

emit

  • emit<T>(type: string, data: T): void
  • Type parameters

    • T

    Parameters

    • type: string
    • data: T

    Returns void

off

  • off(eventName: string): void

on

  • on(type: string, cb: CallableFunction): void
  • Parameters

    • type: string
    • cb: CallableFunction

    Returns void

Generated using TypeDoc