Fix const enum for TypeScript (#364)

This commit is contained in:
Khải 2019-09-27 10:53:54 +07:00 committed by Sindre Sorhus
parent 2a53389d72
commit 4e65299e7b
2 changed files with 24 additions and 0 deletions

View file

@ -223,4 +223,16 @@ 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;