Export TypeScript types for colors and modifiers (#357)

Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
This commit is contained in:
Simen Bekkhus 2019-08-22 15:28:25 +02:00 committed by Sindre Sorhus
parent 1f77953f1a
commit 6b4d20683f
2 changed files with 76 additions and 0 deletions

View file

@ -139,3 +139,7 @@ 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');