File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -86,13 +86,18 @@ module ts {
8686 }
8787
8888 function reportDiagnostic ( diagnostic : Diagnostic ) {
89+ var output = "" ;
90+
8991 if ( diagnostic . file ) {
9092 var loc = diagnostic . file . getLineAndCharacterFromPosition ( diagnostic . start ) ;
91- sys . write ( diagnostic . file . filename + "(" + loc . line + "," + loc . character + "): " + diagnostic . messageText + sys . newLine ) ;
92- }
93- else {
94- sys . write ( diagnostic . messageText + sys . newLine ) ;
93+
94+ var output = diagnostic . file . filename + "(" + loc . line + "," + loc . character + "): " ;
9595 }
96+
97+ var category = DiagnosticCategory [ diagnostic . category ] ;
98+ output += category + " TS" + diagnostic . code + ": " + diagnostic . messageText + sys . newLine ;
99+
100+ sys . write ( output ) ;
96101 }
97102
98103 function reportDiagnostics ( diagnostics : Diagnostic [ ] ) {
You can’t perform that action at this time.
0 commit comments