1 | import type {WriteStream} from 'node:tty';
|
2 |
|
3 | export type Options = {
|
4 | |
5 |
|
6 |
|
7 |
|
8 |
|
9 | readonly sniffFlags?: boolean;
|
10 | };
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 | export type ColorSupportLevel = 0 | 1 | 2 | 3;
|
20 |
|
21 |
|
22 |
|
23 |
|
24 | export type ColorSupport = {
|
25 | |
26 |
|
27 |
|
28 | level: ColorSupportLevel;
|
29 |
|
30 | |
31 |
|
32 |
|
33 | hasBasic: boolean;
|
34 |
|
35 | |
36 |
|
37 |
|
38 | has256: boolean;
|
39 |
|
40 | |
41 |
|
42 |
|
43 | has16m: boolean;
|
44 | };
|
45 |
|
46 | export type ColorInfo = ColorSupport | false;
|
47 |
|
48 | export function createSupportsColor(stream?: WriteStream, options?: Options): ColorInfo;
|
49 |
|
50 | declare const supportsColor: {
|
51 | stdout: ColorInfo;
|
52 | stderr: ColorInfo;
|
53 | };
|
54 |
|
55 | export default supportsColor;
|