Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • EventEmitter2
    • ConcreteEmitter

Implements

Index

Constructors

constructor

  • Parameters

    • Optional options: ConstructorOptions

    Returns ConcreteEmitter

Methods

addListener

  • addListener(event: string, listener: Listener): this
  • Parameters

    • event: string
    • listener: Listener

    Returns this

emit

  • emit(event: string | string[], ...values: any[]): boolean
  • Parameters

    • event: string | string[]
    • Rest ...values: any[]

    Returns boolean

emitAsync

  • emitAsync(event: string | string[], ...values: any[]): Promise<any[]>
  • Parameters

    • event: string | string[]
    • Rest ...values: any[]

    Returns Promise<any[]>

eventNames

  • eventNames(): string[]
  • Returns string[]

listeners

  • listeners(event: string | string[]): Listener[]
  • Parameters

    • event: string | string[]

    Returns Listener[]

listenersAny

  • listenersAny(): Listener[]
  • Returns Listener[]

many

  • many(event: string | string[], timesToListen: number, listener: Listener): this
  • Parameters

    • event: string | string[]
    • timesToListen: number
    • listener: Listener

    Returns this

off

  • off(event: string, listener: Listener): this
  • Parameters

    • event: string
    • listener: Listener

    Returns this

offAny

  • offAny(listener: Listener): this
  • Parameters

    • listener: Listener

    Returns this

on

  • on(event: string | string[], listener: Listener): this
  • Parameters

    • event: string | string[]
    • listener: Listener

    Returns this

onAny

  • onAny(listener: EventAndListener): this
  • Parameters

    • listener: EventAndListener

    Returns this

once

  • once(event: string | string[], listener: Listener): this
  • Parameters

    • event: string | string[]
    • listener: Listener

    Returns this

prependAny

  • prependAny(listener: EventAndListener): this
  • Parameters

    • listener: EventAndListener

    Returns this

prependListener

  • prependListener(event: string | string[], listener: Listener): this
  • Parameters

    • event: string | string[]
    • listener: Listener

    Returns this

prependMany

  • prependMany(event: string | string[], timesToListen: number, listener: Listener): this
  • Parameters

    • event: string | string[]
    • timesToListen: number
    • listener: Listener

    Returns this

prependOnceListener

  • prependOnceListener(event: string | string[], listener: Listener): this
  • Parameters

    • event: string | string[]
    • listener: Listener

    Returns this

removeAllListeners

  • removeAllListeners(event?: string | eventNS): this
  • Parameters

    • Optional event: string | eventNS

    Returns this

removeListener

  • removeListener(event: string | string[], listener: Listener): this
  • Parameters

    • event: string | string[]
    • listener: Listener

    Returns this

setMaxListeners

  • setMaxListeners(n: number): void
  • Parameters

    • n: number

    Returns void

Generated using TypeDoc