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

Function getDiagnosticsHelper

test/fixtures/snapshot/typescript.js:117544–117554  ·  view source on GitHub ↗
(sourceFile, getDiagnostics, cancellationToken)

Source from the content-addressed store, hash-verified

117542 return filesByName.get(path) || undefined;
117543 }
117544 function getDiagnosticsHelper(sourceFile, getDiagnostics, cancellationToken) {
117545 if (sourceFile) {
117546 return getDiagnostics(sourceFile, cancellationToken);
117547 }
117548 return ts.sortAndDeduplicateDiagnostics(ts.flatMap(program.getSourceFiles(), function (sourceFile) {
117549 if (cancellationToken) {
117550 cancellationToken.throwIfCancellationRequested();
117551 }
117552 return getDiagnostics(sourceFile, cancellationToken);
117553 }));
117554 }
117555 function getSyntacticDiagnostics(sourceFile, cancellationToken) {
117556 return getDiagnosticsHelper(sourceFile, getSyntacticDiagnosticsForFile, cancellationToken);
117557 }

Callers 3

getSyntacticDiagnosticsFunction · 0.85
getSemanticDiagnosticsFunction · 0.85

Calls 2

getDiagnosticsFunction · 0.85
flatMapMethod · 0.80

Tested by

no test coverage detected