feat: export available colors as TS type
This commit is contained in:
parent
1f77953f1a
commit
aefb21012d
2 changed files with 74 additions and 0 deletions
|
|
@ -139,3 +139,8 @@ expectType<string>(chalk.bgWhiteBright`foo`);
|
|||
// -- Complex --
|
||||
expectType<string>(chalk.red.bgGreen.underline('foo'));
|
||||
expectType<string>(chalk.underline.red.bgGreen('foo'));
|
||||
|
||||
// -- Color types ==
|
||||
|
||||
expectType<typeof chalk.Color>('red');
|
||||
expectError<typeof chalk.Color>('hotpink');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue