From 351251193ddca4f03ed5676c2dde862734cc5aee Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Thu, 19 Apr 2018 21:54:08 -0700 Subject: [PATCH] Simplified to one output line --- src/compiler/watch.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/compiler/watch.ts b/src/compiler/watch.ts index 0dfe3968826..1b79e71efb8 100644 --- a/src/compiler/watch.ts +++ b/src/compiler/watch.ts @@ -74,11 +74,15 @@ namespace ts { system.write(output); } : (diagnostic, newLine, options) => { + let output = ""; + if (!clearScreenIfNotWatchingForFileChanges(system, diagnostic, options)) { - system.write(newLine); + output += newLine; } - let output = `${new Date().toLocaleTimeString()} - `; + + output += `${new Date().toLocaleTimeString()} - `; output += `${flattenDiagnosticMessageText(diagnostic.messageText, system.newLine)}${getPlainDiagnosticFollowingNewLines(diagnostic, newLine)}`; + system.write(output); }; }