Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

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)): VirtualConsole
  • Parameters

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

          • Rest ...args: any[]

          Returns void

    Returns VirtualConsole

  • 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)): VirtualConsole
  • Parameters

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

          • Rest ...args: any[]

          Returns void

    Returns VirtualConsole

  • Type Parameters

    • K extends "error" | "dir" | "table" | "time" | "memory" | "assert" | "clear" | "count" | "countReset" | "debug" | "dirxml" | "exception" | "group" | "groupCollapsed" | "groupEnd" | "info" | "log" | "timeEnd" | "timeLog" | "timeStamp" | "trace" | "warn" | "Console" | "profile" | "profileEnd"

    Parameters

    • method: K
    • callback: Console[K]

    Returns VirtualConsole

  • Parameters

    • event: "jsdomError"
    • callback: ((e: Error) => void)

    Returns VirtualConsole

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

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

          • Rest ...args: any[]

          Returns void

    Returns VirtualConsole

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

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

          • Rest ...args: any[]

          Returns void

    Returns VirtualConsole

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

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

          • Rest ...args: any[]

          Returns void

    Returns VirtualConsole

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

    • event: string | symbol

    Returns Function[]

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

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

          • Rest ...args: any[]

          Returns void

    Returns VirtualConsole

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

Generated using TypeDoc