MCPcopy Index your code
hub / github.com/nodejs/node / createWatchStatusReporter

Function createWatchStatusReporter

test/fixtures/snapshot/typescript.js:122746–122763  ·  view source on GitHub ↗

* Create a function that reports watch status by writing to the system and handles the formatting of the diagnostic

(system, pretty)

Source from the content-addressed store, hash-verified

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) {

Callers 1

createWatchHostFunction · 0.85

Calls 5

getLocaleTimeStringFunction · 0.85
concatMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected