* Create a function that reports watch status by writing to the system and handles the formatting of the diagnostic
(system, pretty)
| 122744 | * Create a function that reports watch status by writing to the system and handles the formatting of the diagnostic |
| 122745 | */ |
| 122746 | function createWatchStatusReporter(system, pretty) { |
| 122747 | return pretty ? |
| 122748 | function (diagnostic, newLine, options) { |
| 122749 | clearScreenIfNotWatchingForFileChanges(system, diagnostic, options); |
| 122750 | var output = "[".concat(ts.formatColorAndReset(getLocaleTimeString(system), ts.ForegroundColorEscapeSequences.Grey), "] "); |
| 122751 | output += "".concat(ts.flattenDiagnosticMessageText(diagnostic.messageText, system.newLine)).concat(newLine + newLine); |
| 122752 | system.write(output); |
| 122753 | } : |
| 122754 | function (diagnostic, newLine, options) { |
| 122755 | var output = ""; |
| 122756 | if (!clearScreenIfNotWatchingForFileChanges(system, diagnostic, options)) { |
| 122757 | output += newLine; |
| 122758 | } |
| 122759 | output += "".concat(getLocaleTimeString(system), " - "); |
| 122760 | output += "".concat(ts.flattenDiagnosticMessageText(diagnostic.messageText, system.newLine)).concat(getPlainDiagnosticFollowingNewLines(diagnostic, newLine)); |
| 122761 | system.write(output); |
| 122762 | }; |
| 122763 | } |
| 122764 | ts.createWatchStatusReporter = createWatchStatusReporter; |
| 122765 | /** Parses config file using System interface */ |
| 122766 | function parseConfigFileWithSystem(configFileName, optionsToExtend, extendedConfigCache, watchOptionsToExtend, system, reportDiagnostic) { |
no test coverage detected