Change the TypeScript Level type to be a union instead of enum
Fixes #373 Fixes #382
This commit is contained in:
parent
7f21f209da
commit
f0f4638a92
4 changed files with 23 additions and 54 deletions
|
|
@ -4,12 +4,6 @@ import chalk = require('.');
|
|||
// - Helpers -
|
||||
type colorReturn = chalk.Chalk & {supportsColor?: never};
|
||||
|
||||
// - Level -
|
||||
expectType<number>(chalk.Level.None);
|
||||
expectType<number>(chalk.Level.Basic);
|
||||
expectType<number>(chalk.Level.Ansi256);
|
||||
expectType<number>(chalk.Level.TrueColor);
|
||||
|
||||
// - supportsColor -
|
||||
expectType<chalk.ColorSupport | false>(chalk.supportsColor);
|
||||
expectType<boolean>((chalk.supportsColor as chalk.ColorSupport).hasBasic);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue