MCPcopy Create free account
hub / github.com/nodejs/node / prettyPathForFileError

Function prettyPathForFileError

test/fixtures/snapshot/typescript.js:122805–122811  ·  view source on GitHub ↗
(error, cwd)

Source from the content-addressed store, hash-verified

122803 }
122804 ts.getWatchErrorSummaryDiagnosticMessage = getWatchErrorSummaryDiagnosticMessage;
122805 function prettyPathForFileError(error, cwd) {
122806 var line = ts.formatColorAndReset(":" + error.line, ts.ForegroundColorEscapeSequences.Grey);
122807 if (ts.pathIsAbsolute(error.fileName) && ts.pathIsAbsolute(cwd)) {
122808 return ts.getRelativePathFromDirectory(cwd, error.fileName, /* ignoreCase */ false) + line;
122809 }
122810 return error.fileName + line;
122811 }
122812 function getErrorSummaryText(errorCount, filesInError, newLine, host) {
122813 if (errorCount === 0)
122814 return "";

Callers 2

getErrorSummaryTextFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected