File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,8 +50,8 @@ namespace ts {
5050 Diagnostics . File_change_detected_Starting_incremental_compilation . code ,
5151 ] ;
5252
53- function getPlainDiagnosticPrecedingNewLines ( diagnostic : Diagnostic , newLine : string ) : string {
54- return contains ( screenStartingMessageCodes , diagnostic . code )
53+ function getPlainDiagnosticPrecedingNewLines ( diagnostic : Diagnostic , newLine : string , preserveWatchOutput ?: boolean ) : string {
54+ return ! preserveWatchOutput && contains ( screenStartingMessageCodes , diagnostic . code )
5555 ? ""
5656 : newLine ;
5757 }
@@ -75,7 +75,7 @@ namespace ts {
7575 } :
7676 ( diagnostic , newLine , options ) => {
7777 clearScreenIfNotWatchingForFileChanges ( system , diagnostic , options ) ;
78- let output = `${ getPlainDiagnosticPrecedingNewLines ( diagnostic , newLine ) } ${ new Date ( ) . toLocaleTimeString ( ) } - ` ;
78+ let output = `${ getPlainDiagnosticPrecedingNewLines ( diagnostic , newLine , options . preserveWatchOutput ) } ${ new Date ( ) . toLocaleTimeString ( ) } - ` ;
7979 output += `${ flattenDiagnosticMessageText ( diagnostic . messageText , system . newLine ) } ${ getPlainDiagnosticFollowingNewLines ( diagnostic , newLine ) } ` ;
8080 system . write ( output ) ;
8181 } ;
You can’t perform that action at this time.
0 commit comments