@kaguyajs/trss-yunzai-types
    Preparing search index...

    Interface Logger

    interface Logger {
        ansi256: (index: number) => this;
        bgAnsi256: (index: number) => this;
        bgBlack: Logger;
        bgBlackBright: Logger;
        bgBlue: Logger;
        bgBlueBright: Logger;
        bgCyan: Logger;
        bgCyanBright: Logger;
        bgGray: Logger;
        bgGreen: Logger;
        bgGreenBright: Logger;
        bgGrey: Logger;
        bgHex: (color: string) => this;
        bgMagenta: Logger;
        bgMagentaBright: Logger;
        bgRed: Logger;
        bgRedBright: Logger;
        bgRgb: (red: number, green: number, blue: number) => this;
        bgWhite: Logger;
        bgWhiteBright: Logger;
        bgYellow: Logger;
        bgYellowBright: Logger;
        black: Logger;
        blackBright: Logger;
        blue: Logger;
        blueBright: Logger;
        bold: Logger;
        cyan: Logger;
        cyanBright: Logger;
        debug: (...args: any[]) => void;
        dim: Logger;
        error: (...args: any[]) => void;
        fatal: (...args: any[]) => void;
        gray: Logger;
        green: Logger;
        greenBright: Logger;
        grey: Logger;
        hex: (color: string) => this;
        hidden: Logger;
        info: (...args: any[]) => void;
        inverse: Logger;
        italic: Logger;
        level: ColorSupportLevel;
        logger: {
            commandLogger: Logger;
            debug: (...args: any[]) => void;
            defaultLogger: Logger;
            error: (...args: any[]) => void;
            errorLogger: Logger;
            fatal: (...args: any[]) => void;
            info: (...args: any[]) => void;
            mark: (...args: any[]) => void;
            trace: (...args: any[]) => void;
            warn: (...args: any[]) => void;
        };
        magenta: Logger;
        magentaBright: Logger;
        mark: (...args: any[]) => void;
        overline: Logger;
        red: Logger;
        redBright: Logger;
        reset: Logger;
        rgb: (red: number, green: number, blue: number) => this;
        strikethrough: Logger;
        trace: (...args: any[]) => void;
        underline: Logger;
        visible: Logger;
        warn: (...args: any[]) => void;
        white: Logger;
        whiteBright: Logger;
        yellow: Logger;
        yellowBright: Logger;
        (...text: unknown[]): string;
    }

    Hierarchy

    • ChalkInstance
      • Logger
    • Parameters

      • ...text: unknown[]

      Returns string

    Index

    Properties

    ansi256: (index: number) => this

    Use an 8-bit unsigned number to set text color.

    import chalk from 'chalk';

    chalk.ansi256(201);
    bgAnsi256: (index: number) => this

    Use a 8-bit unsigned number to set background color.

    import chalk from 'chalk';

    chalk.bgAnsi256(201);
    bgBlack: Logger
    bgBlackBright: Logger
    bgBlue: Logger
    bgBlueBright: Logger
    bgCyan: Logger
    bgCyanBright: Logger
    bgGray: Logger
    bgGreen: Logger
    bgGreenBright: Logger
    bgGrey: Logger
    bgHex: (color: string) => this

    Use HEX value to set background color.

    Type Declaration

      • (color: string): this
      • Parameters

        • color: string

          Hexadecimal value representing the desired color.

        Returns this

    import chalk from 'chalk';

    chalk.bgHex('#DEADED');
    bgMagenta: Logger
    bgMagentaBright: Logger
    bgRed: Logger
    bgRedBright: Logger
    bgRgb: (red: number, green: number, blue: number) => this

    Use RGB values to set background color.

    import chalk from 'chalk';

    chalk.bgRgb(222, 173, 237);
    bgWhite: Logger
    bgWhiteBright: Logger
    bgYellow: Logger
    bgYellowBright: Logger
    black: Logger
    blackBright: Logger
    blue: Logger
    blueBright: Logger
    bold: Logger

    Modifier: Make the text bold.

    cyan: Logger
    cyanBright: Logger
    debug: (...args: any[]) => void
    dim: Logger

    Modifier: Make the text have lower opacity.

    error: (...args: any[]) => void
    fatal: (...args: any[]) => void
    gray: Logger
    green: Logger
    greenBright: Logger
    grey: Logger
    hex: (color: string) => this

    Use HEX value to set text color.

    Type Declaration

      • (color: string): this
      • Parameters

        • color: string

          Hexadecimal value representing the desired color.

        Returns this

    import chalk from 'chalk';

    chalk.hex('#DEADED');
    hidden: Logger

    Modifier: Print the text but make it invisible.

    info: (...args: any[]) => void
    inverse: Logger

    Modifier: Invert background and foreground colors.

    italic: Logger

    Modifier: Make the text italic. (Not widely supported)

    level: ColorSupportLevel

    The color support for Chalk.

    By default, color support is automatically detected based on the environment.

    Levels:

    • 0 - All colors disabled.
    • 1 - Basic 16 colors support.
    • 2 - ANSI 256 colors support.
    • 3 - Truecolor 16 million colors support.
    logger: {
        commandLogger: Logger;
        debug: (...args: any[]) => void;
        defaultLogger: Logger;
        error: (...args: any[]) => void;
        errorLogger: Logger;
        fatal: (...args: any[]) => void;
        info: (...args: any[]) => void;
        mark: (...args: any[]) => void;
        trace: (...args: any[]) => void;
        warn: (...args: any[]) => void;
    }

    Logger原始方法

    Type Declaration

    • commandLogger: Logger
    • debug: (...args: any[]) => void

      打印 DEGUB 日志

    • defaultLogger: Logger
    • error: (...args: any[]) => void

      打印 ERROR 日志

    • errorLogger: Logger
    • fatal: (...args: any[]) => void

      打印 FATAL 日志

    • info: (...args: any[]) => void

      打印 INFO 日志

    • mark: (...args: any[]) => void

      打印 MARK 日志

    • trace: (...args: any[]) => void

      打印 TRACE 日志

    • warn: (...args: any[]) => void

      打印 WARN 日志

    magenta: Logger
    magentaBright: Logger
    mark: (...args: any[]) => void
    overline: Logger

    Modifier: Put a horizontal line above the text. (Not widely supported)

    red: Logger
    redBright: Logger
    reset: Logger

    Modifier: Reset the current style.

    rgb: (red: number, green: number, blue: number) => this

    Use RGB values to set text color.

    import chalk from 'chalk';

    chalk.rgb(222, 173, 237);
    strikethrough: Logger

    Modifier: Puts a horizontal line through the center of the text. (Not widely supported)

    trace: (...args: any[]) => void
    underline: Logger

    Modifier: Put a horizontal line below the text. (Not widely supported)

    visible: Logger

    Modifier: Print the text only when Chalk has a color level above zero.

    Can be useful for things that are purely cosmetic.

    warn: (...args: any[]) => void
    white: Logger
    whiteBright: Logger
    yellow: Logger
    yellowBright: Logger