Interface ConsoleStyle

ConsoleStyle

Description

Represent a builder for styled strings

interface ConsoleStyle {
    bgBlue: (() => ConsoleStyle);
    bgCyan: (() => ConsoleStyle);
    bgGreen: (() => ConsoleStyle);
    bgMagenta: (() => ConsoleStyle);
    bgRed: (() => ConsoleStyle);
    bgYellow: (() => ConsoleStyle);
    blue: (() => ConsoleStyle);
    bold: (() => ConsoleStyle);
    cyan: (() => ConsoleStyle);
    dim: (() => ConsoleStyle);
    emptyLine: (() => Pick<ConsoleStyle, "toString" | "newLine" | "emptyLine">);
    green: (() => ConsoleStyle);
    inverse: (() => ConsoleStyle);
    italic: (() => ConsoleStyle);
    magenta: (() => ConsoleStyle);
    newLine: ((s) => ConsoleStyle);
    red: (() => ConsoleStyle);
    strike: (() => ConsoleStyle);
    toString: (() => string);
    underline: (() => ConsoleStyle);
    yellow: (() => ConsoleStyle);
}

Hierarchy (view full)

Properties

bgBlue: (() => ConsoleStyle)

Apply blue background style to current line.

Type declaration

Method

Returns

bgCyan: (() => ConsoleStyle)

Apply cyan background style to current line.

Type declaration

Method

Returns

bgGreen: (() => ConsoleStyle)

Apply green background style to current line.

Type declaration

Method

Returns

bgMagenta: (() => ConsoleStyle)

Apply mageta background style to current line.

Type declaration

Method

Returns

bgRed: (() => ConsoleStyle)

Apply red background style to current line.

Type declaration

Method

Returns

bgYellow: (() => ConsoleStyle)

Apply yellow background style to current line.

Type declaration

Method

Returns

blue: (() => ConsoleStyle)

Apply blue text color to current line.

Type declaration

Method

Returns

bold: (() => ConsoleStyle)

Adds bold text style to current line.

Type declaration

Method

Returns

cyan: (() => ConsoleStyle)

Apply cyan text color to current line.

Type declaration

Method

Returns

dim: (() => ConsoleStyle)

Apply text in "dim" style style to current line.

Type declaration

Method

Returns

emptyLine: (() => Pick<ConsoleStyle, "toString" | "newLine" | "emptyLine">)

Adds an empty line.

Type declaration

    • (): Pick<ConsoleStyle, "toString" | "newLine" | "emptyLine">
    • Returns Pick<ConsoleStyle, "toString" | "newLine" | "emptyLine">

Method

Returns

Returns

A ConsoleStyle without color/style methods.

green: (() => ConsoleStyle)

Apply green text color to current line.

Type declaration

Method

Returns

inverse: (() => ConsoleStyle)

Adds inverted colo style to current liner

Type declaration

Method

Returns

italic: (() => ConsoleStyle)

Apply italic text style to current line.

Type declaration

Method

Returns

magenta: (() => ConsoleStyle)

Apply magenta text color to current line.

Type declaration

Method

Returns

newLine: ((s) => ConsoleStyle)

Apply a new line with the provided text.

Type declaration

Method

Returns

red: (() => ConsoleStyle)

Apply red text color to current line.

Type declaration

Method

Returns

strike: (() => ConsoleStyle)

Apply strikethrough text style to current line.

Type declaration

Method

Returns

toString: (() => string)

Parse to string

Type declaration

    • (): string
    • Returns string

Method

Returns

  • The styled string
underline: (() => ConsoleStyle)

Apply underlined text style to current line.

Type declaration

Method

Returns

yellow: (() => ConsoleStyle)

Apply yellow text color to current line.

Type declaration

Method

Returns

Generated using TypeDoc