Options
All
  • Public
  • Public/Protected
  • All
Menu

Writes to the console with CSS format specifiers to support web console colors.

Hierarchy

Index

Constructors

constructor

Properties

Protected buffer

buffer: string = ""

Protected color

color: ColorState = ...

Protected styles

styles: string[] = []

CSS Styles appended to the console.log call.

Methods

bg

clear

  • clear(): void
  • Clears the internal buffer but keeps the current colors.

    override

    Returns void

fg

print

  • print(): void
  • Prints the formatted content of this writer in the console.

    override

    Returns void

push

  • push(str: string): void
  • Writes a string to the internal buffer.

    Parameters

    • str: string

      String to write.

    Returns void

Protected pushColor

  • pushColor(): void

resetColor

  • resetColor(fg?: boolean, bg?: boolean): void
  • Resets the current color to the default.

    Parameters

    • Optional fg: boolean

      Foreground color.

    • Optional bg: boolean

      Background color.

    Returns void

toString

  • toString(): string

Generated using TypeDoc