Options
All
  • Public
  • Public/Protected
  • All
Menu

Type Parameters

  • HandlerFuncs extends HandlerFuncTypeHash

Hierarchy

  • Emitter

Index

Constructors

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

    • HandlerFuncs extends HandlerFuncTypeHash

    Returns Emitter<HandlerFuncs>

Properties

handlers: any
options: any
thisContext: any

Methods

  • hasHandlers(type: keyof HandlerFuncs): boolean
  • Parameters

    • type: keyof HandlerFuncs

    Returns boolean

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

    • Prop extends string | number | symbol

    Parameters

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

    Returns void

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

    • Prop extends string | number | symbol

    Parameters

    • type: Prop
    • handler: HandlerFuncs[Prop]

    Returns void

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

    • options: Partial<HandlerFuncs>

    Returns void

  • setThisContext(thisContext: any): void
  • Parameters

    • thisContext: any

    Returns void

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

    • Prop extends string | number | symbol

    Parameters

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

    Returns void

Generated using TypeDoc