Class OutputManager

The OutputManager class manages the output of debug messages to the console.

Hierarchy

  • OutputManager

Constructors

Properties

colors: typeof colors = colors

Ansi-colors object

debug: MethodDisabler = ...

A MethodDisabler instance for disabling the debug method of the console object.

debugMsgQueue: (() => any)[] = []

An array that holds queued debug messages.

Type declaration

    • (): any
    • Returns any

stderr: MethodDisabler = ...

A MethodDisabler instance for disabling the write method of the process.stderr object.

stdout: MethodDisabler = ...

A MethodDisabler instance for disabling the write method of the process.stdout object.

instance: OutputManager

The singleton instance of the OutputManager class.

Accessors

Methods

  • Outputs a debug message to the console. If the debug method is enabled, the message is immediately logged to the console. Otherwise, the message is added to the debug message queue.

    Parameters

    • fn: (() => any)

      A function that returns the debug message.

        • (): any
        • Returns any

    Returns void

  • Resets the OutputManager to its default state.

    • Enables colors.
    • Enables the write method of the process.stdout object.
    • Enables the write method of the process.stderr object.
    • Disables the debug method of the console object.

    Returns OutputManager

    The OutputManager instance.

Generated using TypeDoc