Added test for Typescript definition

This commit is contained in:
Thomas Sauer 2017-07-02 14:32:45 +02:00
parent 3cd849197d
commit f18decbd7f
4 changed files with 43 additions and 2 deletions

31
types/test.ts Normal file
View file

@ -0,0 +1,31 @@
import * as chalk from '../.';
chalk.underline('foo');
chalk.red('foo');
chalk.bgRed('foo');
chalk.red`foo`;
chalk.underline`foo`;
chalk`foo`;
chalk.red.bgGreen.underline('foo');
chalk.underline.red.bgGreen('foo');
chalk.grey('foo');
chalk.red(0);
const ctx = chalk.constructor({level: 1});
ctx('foo');
ctx.red('foo');
ctx`foo`;
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');