@@ -242,22 +242,22 @@ namespace ts {
242242 }
243243
244244 /** @internal */
245- export const foregroundColorEscapeSequences = {
246- grey : "\u001b[90m" ,
247- red : "\u001b[91m" ,
248- yellow : "\u001b[93m" ,
249- blue : "\u001b[94m" ,
250- cyan : "\u001b[96m"
251- } ;
245+ export enum ForegroundColorEscapeSequences {
246+ Grey = "\u001b[90m" ,
247+ Red = "\u001b[91m" ,
248+ Yellow = "\u001b[93m" ,
249+ Blue = "\u001b[94m" ,
250+ Cyan = "\u001b[96m"
251+ }
252252 const gutterStyleSequence = "\u001b[30;47m" ;
253253 const gutterSeparator = " " ;
254254 const resetEscapeSequence = "\u001b[0m" ;
255255 const ellipsis = "..." ;
256256 function getCategoryFormat ( category : DiagnosticCategory ) : string {
257257 switch ( category ) {
258- case DiagnosticCategory . Warning : return foregroundColorEscapeSequences . yellow ;
259- case DiagnosticCategory . Error : return foregroundColorEscapeSequences . red ;
260- case DiagnosticCategory . Message : return foregroundColorEscapeSequences . blue ;
258+ case DiagnosticCategory . Warning : return ForegroundColorEscapeSequences . Yellow ;
259+ case DiagnosticCategory . Error : return ForegroundColorEscapeSequences . Red ;
260+ case DiagnosticCategory . Message : return ForegroundColorEscapeSequences . Blue ;
261261 }
262262 }
263263
@@ -311,7 +311,7 @@ namespace ts {
311311
312312 // Output the gutter and the error span for the line using tildes.
313313 context += formatColorAndReset ( padLeft ( "" , gutterWidth ) , gutterStyleSequence ) + gutterSeparator ;
314- context += foregroundColorEscapeSequences . red ;
314+ context += ForegroundColorEscapeSequences . Red ;
315315 if ( i === firstLine ) {
316316 // If we're on the last line, then limit it to the last character of the last line.
317317 // Otherwise, we'll just squiggle the rest of the line, giving 'slice' no end position.
@@ -330,18 +330,18 @@ namespace ts {
330330 context += resetEscapeSequence ;
331331 }
332332
333- output += formatColorAndReset ( relativeFileName , foregroundColorEscapeSequences . cyan ) ;
333+ output += formatColorAndReset ( relativeFileName , ForegroundColorEscapeSequences . Cyan ) ;
334334 output += "(" ;
335- output += formatColorAndReset ( `${ firstLine + 1 } ` , foregroundColorEscapeSequences . yellow ) ;
335+ output += formatColorAndReset ( `${ firstLine + 1 } ` , ForegroundColorEscapeSequences . Yellow ) ;
336336 output += "," ;
337- output += formatColorAndReset ( `${ firstLineChar + 1 } ` , foregroundColorEscapeSequences . yellow ) ;
337+ output += formatColorAndReset ( `${ firstLineChar + 1 } ` , ForegroundColorEscapeSequences . Yellow ) ;
338338 output += "): " ;
339339 }
340340
341341 const categoryColor = getCategoryFormat ( diagnostic . category ) ;
342342 const category = DiagnosticCategory [ diagnostic . category ] . toLowerCase ( ) ;
343343 output += formatColorAndReset ( category , categoryColor ) ;
344- output += formatColorAndReset ( ` TS${ diagnostic . code } : ` , foregroundColorEscapeSequences . grey ) ;
344+ output += formatColorAndReset ( ` TS${ diagnostic . code } : ` , ForegroundColorEscapeSequences . Grey ) ;
345345 output += flattenDiagnosticMessageText ( diagnostic . messageText , host . getNewLine ( ) ) ;
346346
347347 if ( diagnostic . file ) {
0 commit comments