Added test for Typescript definition
This commit is contained in:
parent
3cd849197d
commit
f18decbd7f
4 changed files with 43 additions and 2 deletions
31
types/test.ts
Normal file
31
types/test.ts
Normal 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');
|
||||
Loading…
Add table
Add a link
Reference in a new issue