chalk/types/index.d.ts

80 lines
2 KiB
TypeScript
Raw Normal View History

/// <reference path="./options.d.ts" />
interface ChalkConstructor {
new (options?: Chalk.Options): Chalk;
(options?: Chalk.Options): Chalk;
2017-10-23 23:02:36 -05:00
}
interface Chalk {
2017-10-17 22:10:43 -05:00
(...text: string[]): string;
(text: TemplateStringsArray, ...placeholders: string[]): string;
2017-10-23 23:02:36 -05:00
constructor: ChalkConstructor;
2017-10-17 22:10:43 -05:00
enabled: boolean;
level: Chalk.Level;
2017-10-23 23:02:36 -05:00
rgb(r: number, g: number, b: number): this;
hsl(h: number, s: number, l: number): this;
hsv(h: number, s: number, v: number): this;
hwb(h: number, w: number, b: number): this;
bgHex(color: string): this;
bgKeyword(color: string): this;
bgRgb(r: number, g: number, b: number): this;
bgHsl(h: number, s: number, l: number): this;
bgHsv(h: number, s: number, v: number): this;
bgHwb(h: number, w: number, b: number): this;
hex(color: string): this;
keyword(color: string): this;
2017-10-17 22:10:43 -05:00
2017-10-23 23:02:36 -05:00
readonly reset: this;
readonly bold: this;
readonly dim: this;
readonly italic: this;
readonly underline: this;
readonly inverse: this;
readonly hidden: this;
readonly strikethrough: this;
2017-10-17 22:10:43 -05:00
2017-10-23 23:02:36 -05:00
readonly visible: this;
2017-10-23 23:02:36 -05:00
readonly black: this;
readonly red: this;
readonly green: this;
readonly yellow: this;
readonly blue: this;
readonly magenta: this;
readonly cyan: this;
readonly white: this;
readonly gray: this;
readonly grey: this;
readonly blackBright: this;
readonly redBright: this;
readonly greenBright: this;
readonly yellowBright: this;
readonly blueBright: this;
readonly magentaBright: this;
readonly cyanBright: this;
readonly whiteBright: this;
2017-10-17 22:10:43 -05:00
2017-10-23 23:02:36 -05:00
readonly bgBlack: this;
readonly bgRed: this;
readonly bgGreen: this;
readonly bgYellow: this;
readonly bgBlue: this;
readonly bgMagenta: this;
readonly bgCyan: this;
readonly bgWhite: this;
readonly bgBlackBright: this;
readonly bgRedBright: this;
readonly bgGreenBright: this;
readonly bgYellowBright: this;
readonly bgBlueBright: this;
readonly bgMagentaBright: this;
readonly bgCyanBright: this;
readonly bgWhiteBright: this;
2017-10-17 22:10:43 -05:00
}
interface chalk extends Chalk {
supportsColor: Chalk.ColorSupport;
default: chalk
}
declare const chalk: chalk
export = chalk
2017-10-23 23:02:36 -05:00