Export createSupportsColor function from supports-color

This commit is contained in:
Luke Karrys 2023-06-13 23:59:58 -07:00
parent a370f468a4
commit d0927f56a0
No known key found for this signature in database
4 changed files with 10 additions and 2 deletions

View file

@ -1,6 +1,6 @@
import {expectType, expectAssignable, expectError, expectDeprecated} from 'tsd';
import chalk, {
Chalk, ChalkInstance, ColorInfo, ColorSupport, ColorSupportLevel, chalkStderr, supportsColor, supportsColorStderr,
Chalk, ChalkInstance, ColorInfo, ColorSupport, ColorSupportLevel, chalkStderr, supportsColor, supportsColorStderr, createSupportsColor,
ModifierName, ForegroundColorName, BackgroundColorName, ColorName,
Modifiers,
} from './index.js';
@ -24,6 +24,8 @@ if (supportsColorStderr) {
expectType<boolean>(supportsColorStderr.has16m);
}
expectType<ColorInfo>(createSupportsColor());
// -- `supportsColorStderr` is not a member of the Chalk interface --
expectError(chalk.reset.supportsColorStderr);