feat: export available colors as TS type

This commit is contained in:
Simen Bekkhus 2019-07-15 11:25:30 +02:00
parent 1f77953f1a
commit aefb21012d
No known key found for this signature in database
GPG key ID: 92B92EBAD80DE3CE
2 changed files with 74 additions and 0 deletions

View file

@ -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');