Skip to content

Commit 3512511

Browse files
author
Josh Goldberg
committed
Simplified to one output line
1 parent 8d6c2bc commit 3512511

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/compiler/watch.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,15 @@ namespace ts {
7474
system.write(output);
7575
} :
7676
(diagnostic, newLine, options) => {
77+
let output = "";
78+
7779
if (!clearScreenIfNotWatchingForFileChanges(system, diagnostic, options)) {
78-
system.write(newLine);
80+
output += newLine;
7981
}
80-
let output = `${new Date().toLocaleTimeString()} - `;
82+
83+
output += `${new Date().toLocaleTimeString()} - `;
8184
output += `${flattenDiagnosticMessageText(diagnostic.messageText, system.newLine)}${getPlainDiagnosticFollowingNewLines(diagnostic, newLine)}`;
85+
8286
system.write(output);
8387
};
8488
}

0 commit comments

Comments
 (0)