Expose styles as variables

This commit is contained in:
LitoMore 2022-10-04 04:43:11 +08:00
parent c2311622c3
commit 7c3fa8d0d5
No known key found for this signature in database
GPG key ID: B8653F9344667340
2 changed files with 8 additions and 0 deletions

4
source/index.d.ts vendored
View file

@ -284,4 +284,8 @@ export {
// } from '#supports-color';
} from './vendor/supports-color/index.js';
export const modifiers: Modifiers[];
export const foregroundColors: ForegroundColor[];
export const backgroundColors: BackgroundColor[];
export default chalk;

View file

@ -209,4 +209,8 @@ export {
stderrColor as supportsColorStderr,
};
export const modifiers = Object.keys(ansiStyles.modifier);
export const foregroundColors = Object.keys(ansiStyles.color);
export const backgroundColors = Object.keys(ansiStyles.bgColor);
export default chalk;