This commit is contained in:
LitoMore 2022-10-04 13:31:53 +08:00
parent 7c3fa8d0d5
commit 195f7baad7
No known key found for this signature in database
GPG key ID: B8653F9344667340
3 changed files with 9 additions and 3 deletions

View file

@ -201,6 +201,10 @@ Explicit 256/Truecolor mode can be enabled using the `--color=256` and `--color=
`chalkStderr` contains a separate instance configured with color support detected for `stderr` stream instead of `stdout`. Override rules from `supportsColor` apply to this too. `supportsColorStderr` is exposed for convenience.
### modifiers, foregroundColors, backgroundColors and colors
All supported style strings are exposed for convenience. `colors` is the combination of `foregroundColors` and `backgroundColors`.
## Styles
### Modifiers

7
source/index.d.ts vendored
View file

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

View file

@ -212,5 +212,6 @@ export {
export const modifiers = Object.keys(ansiStyles.modifier);
export const foregroundColors = Object.keys(ansiStyles.color);
export const backgroundColors = Object.keys(ansiStyles.bgColor);
export const colors = [...foregroundColors, ...backgroundColors];
export default chalk;