Options
All
  • Public
  • Public/Protected
  • All
Menu

Type parameters

  • HandlerFuncs: HandlerFuncTypeHash

Hierarchy

  • Emitter

Index

Constructors

constructor

  • new Emitter<HandlerFuncs>(): Emitter<HandlerFuncs>
  • Type parameters

    • HandlerFuncs: HandlerFuncTypeHash

    Returns Emitter<HandlerFuncs>

Properties

Private handlers

handlers: any

Private options

options: any

Private thisContext

thisContext: any

Methods

hasHandlers

  • hasHandlers(type: keyof HandlerFuncs): number | Partial<HandlerFuncs>[keyof HandlerFuncs]
  • Parameters

    • type: keyof HandlerFuncs

    Returns number | Partial<HandlerFuncs>[keyof HandlerFuncs]

off

  • off<Prop>(type: Prop, handler?: HandlerFuncs[Prop]): void
  • Type parameters

    • Prop: string | number | symbol

    Parameters

    • type: Prop
    • Optional handler: HandlerFuncs[Prop]

    Returns void

on

  • on<Prop>(type: Prop, handler: HandlerFuncs[Prop]): void
  • Type parameters

    • Prop: string | number | symbol

    Parameters

    • type: Prop
    • handler: HandlerFuncs[Prop]

    Returns void

setOptions

  • setOptions(options: Partial<HandlerFuncs>): void
  • Parameters

    • options: Partial<HandlerFuncs>

    Returns void

setThisContext

  • setThisContext(thisContext: any): void
  • Parameters

    • thisContext: any

    Returns void

trigger

  • trigger<Prop>(type: Prop, ...args: Parameters<HandlerFuncs[Prop]>): void
  • Type parameters

    • Prop: string | number | symbol

    Parameters

    • type: Prop
    • Rest ...args: Parameters<HandlerFuncs[Prop]>

    Returns void

Generated using TypeDoc