You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -85,17 +84,15 @@ type R = (r: N, g: N, b: N) => A;
85
84
// Short alias
86
85
typeA=Ansis;
87
86
88
-
typeP={open: S;close: S};
89
-
90
87
typeAnsis={
91
88
/**
92
89
* Opening ANSI escape code for a style or color.
93
90
*/
94
-
//open: S;
91
+
open: S;
95
92
/**
96
93
* Closing ANSI escape code for a style or color.
97
94
*/
98
-
//close: S;
95
+
close: S;
99
96
100
97
/**
101
98
* @param {unknown} v The value to be processed, can be of any type, which will be converted to a string.
@@ -116,21 +113,6 @@ type Ansis = {
116
113
*/
117
114
(s: TemplateStringsArray, ...v: any[]): S;
118
115
119
-
/**
120
-
* Whether the output supports ANSI color and styles.
121
-
*
122
-
* @return {boolean}
123
-
*/
124
-
isSupported(): B;
125
-
126
-
/**
127
-
* Remove ANSI styling codes.
128
-
*
129
-
* @param {string} s
130
-
* @return {string}
131
-
*/
132
-
strip(s: S): S;
133
-
134
116
/**
135
117
* Set [256-color ANSI code](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) for foreground color.
136
118
*/
@@ -161,7 +143,22 @@ type Ansis = {
161
143
*/
162
144
bgHex: L;
163
145
164
-
/**
146
+
/**
147
+
* Whether the output supports ANSI color and styles.
148
+
*
149
+
* @return {boolean}
150
+
*/
151
+
isSupported(): B;
152
+
153
+
/**
154
+
* Remove ANSI styling codes.
155
+
*
156
+
* @param {string} s
157
+
* @return {string}
158
+
*/
159
+
strip(s: S): S;
160
+
161
+
/**
165
162
* Extends Ansis with additional colors.
166
163
*
167
164
* For example:
@@ -176,9 +173,8 @@ type Ansis = {
176
173
* @param {string | { open: string; close: string }} c A record of new colors to add, with either a string or an object containing `open` and `close` sequences.
177
174
* @return {Ansis} Return extended instance.
178
175
*/
179
-
//extend<U extends S>(c: Record<U, any>): A & Record<U, A>;
0 commit comments