Sha256: 8bfffba0723b6738979987af452a9f513a4271936e7f4a31332b408bd580d09a

Contents?: true

Size: 1.88 KB

Versions: 171

Compression:

Stored size: 1.88 KB

Contents

// @flow strict

type TemplateStringsArray = $ReadOnlyArray<string>;

export type Level = $Values<{
	None: 0,
	Basic: 1,
	Ansi256: 2,
	TrueColor: 3
}>;

export type ChalkOptions = {|
	enabled?: boolean,
	level?: Level
|};

export type ColorSupport = {|
	level: Level,
	hasBasic: boolean,
	has256: boolean,
	has16m: boolean
|};

export interface Chalk {
	(...text: string[]): string,
	(text: TemplateStringsArray, ...placeholders: string[]): string,
	constructor(options?: ChalkOptions): Chalk,
	enabled: boolean,
	level: Level,
	rgb(r: number, g: number, b: number): Chalk,
	hsl(h: number, s: number, l: number): Chalk,
	hsv(h: number, s: number, v: number): Chalk,
	hwb(h: number, w: number, b: number): Chalk,
	bgHex(color: string): Chalk,
	bgKeyword(color: string): Chalk,
	bgRgb(r: number, g: number, b: number): Chalk,
	bgHsl(h: number, s: number, l: number): Chalk,
	bgHsv(h: number, s: number, v: number): Chalk,
	bgHwb(h: number, w: number, b: number): Chalk,
	hex(color: string): Chalk,
	keyword(color: string): Chalk,

	+reset: Chalk,
	+bold: Chalk,
	+dim: Chalk,
	+italic: Chalk,
	+underline: Chalk,
	+inverse: Chalk,
	+hidden: Chalk,
	+strikethrough: Chalk,

	+visible: Chalk,

	+black: Chalk,
	+red: Chalk,
	+green: Chalk,
	+yellow: Chalk,
	+blue: Chalk,
	+magenta: Chalk,
	+cyan: Chalk,
	+white: Chalk,
	+gray: Chalk,
	+grey: Chalk,
	+blackBright: Chalk,
	+redBright: Chalk,
	+greenBright: Chalk,
	+yellowBright: Chalk,
	+blueBright: Chalk,
	+magentaBright: Chalk,
	+cyanBright: Chalk,
	+whiteBright: Chalk,

	+bgBlack: Chalk,
	+bgRed: Chalk,
	+bgGreen: Chalk,
	+bgYellow: Chalk,
	+bgBlue: Chalk,
	+bgMagenta: Chalk,
	+bgCyan: Chalk,
	+bgWhite: Chalk,
	+bgBlackBright: Chalk,
	+bgRedBright: Chalk,
	+bgGreenBright: Chalk,
	+bgYellowBright: Chalk,
	+bgBlueBright: Chalk,
	+bgMagentaBright: Chalk,
	+bgCyanBright: Chalk,
	+bgWhiteBrigh: Chalk,

	supportsColor: ColorSupport
};

declare module.exports: Chalk;

Version data entries

171 entries across 170 versions & 18 rubygems

Version Path
trusty-cms-5.0.7 node_modules/chalk/index.js.flow
trusty-cms-5.0.6 node_modules/chalk/index.js.flow
trusty-cms-5.0.5 node_modules/chalk/index.js.flow
trusty-cms-5.0.4 node_modules/chalk/index.js.flow
disco_app-0.16.1 test/dummy/node_modules/chalk/index.js.flow
disco_app-0.15.2 test/dummy/node_modules/chalk/index.js.flow
trusty-cms-5.0.3 node_modules/chalk/index.js.flow
trusty-cms-5.0.2 node_modules/chalk/index.js.flow
disco_app-0.18.4 test/dummy/node_modules/chalk/index.js.flow
disco_app-0.18.1 test/dummy/node_modules/chalk/index.js.flow
disco_app-0.12.7.pre.puma.pre.3 test/dummy/node_modules/chalk/index.js.flow
disco_app-0.14.0 test/dummy/node_modules/chalk/index.js.flow
disco_app-0.13.6.pre.puma.pre.3 test/dummy/node_modules/chalk/index.js.flow
trusty-cms-5.0.1 node_modules/chalk/index.js.flow
trusty-cms-4.3.5 node_modules/chalk/index.js.flow
trusty-cms-5.0.0 node_modules/chalk/index.js.flow
trusty-cms-4.3.4 node_modules/chalk/index.js.flow
trusty-cms-4.3.3 node_modules/chalk/index.js.flow
trusty-cms-4.3.2 node_modules/chalk/index.js.flow
trusty-cms-4.3.1 node_modules/chalk/index.js.flow