chalk/types/test.ts
2017-07-02 17:26:14 +02:00

37 lines
758 B
TypeScript

import * as chalk from '..';
chalk.underline('foo');
chalk.red('foo');
chalk.bgRed('foo');
const name = 'Josh';
const number = 0;
chalk`Hello {bold.red ${name}}`;
chalk.red`foo`;
chalk.underline`foo`;
chalk`foo`;
chalk.red.bgGreen.underline('foo');
chalk.underline.red.bgGreen('foo');
chalk.grey('foo');
chalk.constructor({level: 1});
const ctx = chalk.constructor({level: chalk.ChalkLevel.TrueColor });
ctx('foo');
ctx.red('foo');
ctx`foo`;
chalk.level === chalk.ChalkLevel.Extended;
chalk.enabled;
chalk.supportsColor;
chalk.level;
chalk.keyword('orange').bgBlue('foo');
chalk.hex('#123456').bgBlue('foo');
chalk.rgb(1, 14, 9).bgBlue('foo');
chalk.hsl(1, 14, 9).bgBlue('foo');
chalk.hsv(1, 14, 9).bgBlue('foo');
chalk.hwb(1, 14, 9).bgBlue('foo');