Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface EventEmitter

Hierarchy

Index

Methods

addListener

  • addListener(event: string | symbol, listener: (...args: any[]) => void): EventEmitter
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns EventEmitter

emit

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

    • event: string | symbol
    • Rest ...args: any[]

    Returns boolean

eventNames

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

getMaxListeners

  • getMaxListeners(): number
  • Returns number

listenerCount

  • listenerCount(type: string | symbol): number
  • Parameters

    • type: string | symbol

    Returns number

listeners

  • listeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

off

  • off(event: string | symbol, listener: (...args: any[]) => void): EventEmitter
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns EventEmitter

on

  • on(event: string | symbol, listener: (...args: any[]) => void): EventEmitter
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns EventEmitter

once

  • once(event: string | symbol, listener: (...args: any[]) => void): EventEmitter
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns EventEmitter

prependListener

  • prependListener(event: string | symbol, listener: (...args: any[]) => void): EventEmitter
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns EventEmitter

prependOnceListener

  • prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): EventEmitter
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns EventEmitter

rawListeners

  • rawListeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

removeAllListeners

  • Parameters

    • Optional event: string | symbol

    Returns EventEmitter

removeListener

  • removeListener(event: string | symbol, listener: (...args: any[]) => void): EventEmitter
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns EventEmitter

setMaxListeners

  • Parameters

    • n: number

    Returns EventEmitter

Generated using TypeDoc