Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

  • Parameters

    Returns EventEmitter

Properties

defaultMaxListeners: number
errorMonitor: typeof errorMonitor

This symbol shall be used to install a listener for only monitoring 'error' events. Listeners installed using this symbol are called before the regular 'error' listeners are called.

Installing a listener using this symbol does not change the behavior once an 'error' event is emitted, therefore the process will still crash if no regular 'error' listener is installed.

Methods

  • 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(event: string | symbol, ...args: any[]): boolean
  • Parameters

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

    Returns boolean

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

  • getMaxListeners(): number
  • listenerCount(event: string | symbol): number
  • Parameters

    • event: string | symbol

    Returns number

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

    • event: string | symbol

    Returns Function[]

  • 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(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(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(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(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(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

  • 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

  • listenerCount(emitter: EventEmitter, event: string | symbol): number
  • deprecated

    since v4.0.0

    Parameters

    Returns number

Generated using TypeDoc