Change the TypeScript Level type to be a union instead of enum

Fixes #373
Fixes #382
This commit is contained in:
Sindre Sorhus 2020-04-02 15:46:17 +08:00
parent 7f21f209da
commit f0f4638a92
4 changed files with 23 additions and 54 deletions

View file

@ -218,16 +218,4 @@ chalk.supportsColor = stdoutColor;
chalk.stderr = Chalk({level: stderrColor ? stderrColor.level : 0}); // eslint-disable-line new-cap
chalk.stderr.supportsColor = stderrColor;
// For TypeScript
chalk.Level = {
None: 0,
Basic: 1,
Ansi256: 2,
TrueColor: 3,
0: 'None',
1: 'Basic',
2: 'Ansi256',
3: 'TrueColor'
};
module.exports = chalk;