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

Function getDiagnostics

test/fixtures/snapshot/typescript.js:18053–18063  ·  view source on GitHub ↗
(fileName)

Source from the content-addressed store, hash-verified

18051 return nonFileDiagnostics;
18052 }
18053 function getDiagnostics(fileName) {
18054 if (fileName) {
18055 return fileDiagnostics.get(fileName) || [];
18056 }
18057 var fileDiags = ts.flatMapToMutable(filesWithDiagnostics, function (f) { return fileDiagnostics.get(f); });
18058 if (!nonFileDiagnostics.length) {
18059 return fileDiags;
18060 }
18061 fileDiags.unshift.apply(fileDiags, nonFileDiagnostics);
18062 return fileDiags;
18063 }
18064 }
18065 ts.createDiagnosticCollection = createDiagnosticCollection;
18066 var templateSubstitutionRegExp = /\$\{/g;

Callers 5

getEmitResolverFunction · 0.85
getDiagnosticsHelperFunction · 0.85
getAndCacheDiagnosticsFunction · 0.85
getFixesFunction · 0.85
eachDiagnosticFunction · 0.85

Calls 3

getDiagnosticsWorkerFunction · 0.85
getMethod · 0.65
applyMethod · 0.45

Tested by

no test coverage detected