123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411 |
- declare const enum LevelEnum {
-
- None = 0,
-
- Basic = 1,
-
- Ansi256 = 2,
-
- TrueColor = 3
- }
- declare type ForegroundColor =
- | 'black'
- | 'red'
- | 'green'
- | 'yellow'
- | 'blue'
- | 'magenta'
- | 'cyan'
- | 'white'
- | 'gray'
- | 'grey'
- | 'blackBright'
- | 'redBright'
- | 'greenBright'
- | 'yellowBright'
- | 'blueBright'
- | 'magentaBright'
- | 'cyanBright'
- | 'whiteBright';
- declare type BackgroundColor =
- | 'bgBlack'
- | 'bgRed'
- | 'bgGreen'
- | 'bgYellow'
- | 'bgBlue'
- | 'bgMagenta'
- | 'bgCyan'
- | 'bgWhite'
- | 'bgGray'
- | 'bgGrey'
- | 'bgBlackBright'
- | 'bgRedBright'
- | 'bgGreenBright'
- | 'bgYellowBright'
- | 'bgBlueBright'
- | 'bgMagentaBright'
- | 'bgCyanBright'
- | 'bgWhiteBright';
- declare type Color = ForegroundColor | BackgroundColor;
- declare type Modifiers =
- | 'reset'
- | 'bold'
- | 'dim'
- | 'italic'
- | 'underline'
- | 'inverse'
- | 'hidden'
- | 'strikethrough'
- | 'visible';
- declare namespace chalk {
- type Level = LevelEnum;
- interface Options {
-
- level?: Level;
- }
- interface Instance {
-
- new (options?: Options): Chalk;
- }
-
- interface ColorSupport {
-
- level: Level;
-
- hasBasic: boolean;
-
- has256: boolean;
-
- has16m: boolean;
- }
- interface ChalkFunction {
-
- (text: TemplateStringsArray, ...placeholders: unknown[]): string;
- (...text: unknown[]): string;
- }
- interface Chalk extends ChalkFunction {
-
- Instance: Instance;
-
- level: Level;
-
- hex(color: string): Chalk;
-
- keyword(color: string): Chalk;
-
- rgb(red: number, green: number, blue: number): Chalk;
-
- hsl(hue: number, saturation: number, lightness: number): Chalk;
-
- hsv(hue: number, saturation: number, value: number): Chalk;
-
- hwb(hue: number, whiteness: number, blackness: number): Chalk;
-
- ansi(code: number): Chalk;
-
- ansi256(index: number): Chalk;
-
- bgHex(color: string): Chalk;
-
- bgKeyword(color: string): Chalk;
-
- bgRgb(red: number, green: number, blue: number): Chalk;
-
- bgHsl(hue: number, saturation: number, lightness: number): Chalk;
-
- bgHsv(hue: number, saturation: number, value: number): Chalk;
-
- bgHwb(hue: number, whiteness: number, blackness: number): Chalk;
-
- bgAnsi(code: number): Chalk;
-
- bgAnsi256(index: number): Chalk;
-
- readonly reset: Chalk;
-
- readonly bold: Chalk;
-
- readonly dim: Chalk;
-
- readonly italic: Chalk;
-
- readonly underline: Chalk;
-
- readonly inverse: Chalk;
-
- readonly hidden: Chalk;
-
- readonly strikethrough: Chalk;
-
- readonly visible: Chalk;
- readonly black: Chalk;
- readonly red: Chalk;
- readonly green: Chalk;
- readonly yellow: Chalk;
- readonly blue: Chalk;
- readonly magenta: Chalk;
- readonly cyan: Chalk;
- readonly white: Chalk;
-
- readonly gray: Chalk;
-
- readonly grey: Chalk;
- readonly blackBright: Chalk;
- readonly redBright: Chalk;
- readonly greenBright: Chalk;
- readonly yellowBright: Chalk;
- readonly blueBright: Chalk;
- readonly magentaBright: Chalk;
- readonly cyanBright: Chalk;
- readonly whiteBright: Chalk;
- readonly bgBlack: Chalk;
- readonly bgRed: Chalk;
- readonly bgGreen: Chalk;
- readonly bgYellow: Chalk;
- readonly bgBlue: Chalk;
- readonly bgMagenta: Chalk;
- readonly bgCyan: Chalk;
- readonly bgWhite: Chalk;
-
- readonly bgGray: Chalk;
-
- readonly bgGrey: Chalk;
- readonly bgBlackBright: Chalk;
- readonly bgRedBright: Chalk;
- readonly bgGreenBright: Chalk;
- readonly bgYellowBright: Chalk;
- readonly bgBlueBright: Chalk;
- readonly bgMagentaBright: Chalk;
- readonly bgCyanBright: Chalk;
- readonly bgWhiteBright: Chalk;
- }
- }
- declare const chalk: chalk.Chalk & chalk.ChalkFunction & {
- supportsColor: chalk.ColorSupport | false;
- Level: typeof LevelEnum;
- Color: Color;
- ForegroundColor: ForegroundColor;
- BackgroundColor: BackgroundColor;
- Modifiers: Modifiers;
- stderr: chalk.Chalk & {supportsColor: chalk.ColorSupport | false};
- };
- export = chalk;
|