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

Function checkSourceFileWithEagerDiagnostics

test/fixtures/snapshot/typescript.js:86017–86028  ·  view source on GitHub ↗
(sourceFile)

Source from the content-addressed store, hash-verified

86015 deferredDiagnosticsCallbacks = [];
86016 }
86017 function checkSourceFileWithEagerDiagnostics(sourceFile) {
86018 ensurePendingDiagnosticWorkComplete();
86019 // then setup diagnostics for immediate invocation (as we are about to collect them, and
86020 // this avoids the overhead of longer-lived callbacks we don't need to allocate)
86021 // This also serves to make the shift to possibly lazy diagnostics transparent to serial command-line scenarios
86022 // (as in those cases, all the diagnostics will still be computed as the appropriate place in the tree,
86023 // thus much more likely retaining the same union ordering as before we had lazy diagnostics)
86024 var oldAddLazyDiagnostics = addLazyDiagnostic;
86025 addLazyDiagnostic = function (cb) { return cb(); };
86026 checkSourceFile(sourceFile);
86027 addLazyDiagnostic = oldAddLazyDiagnostics;
86028 }
86029 function getDiagnosticsWorker(sourceFile) {
86030 if (sourceFile) {
86031 ensurePendingDiagnosticWorkComplete();

Callers 2

createTypeCheckerFunction · 0.85
getDiagnosticsWorkerFunction · 0.85

Calls 3

checkSourceFileFunction · 0.85
cbFunction · 0.50

Tested by

no test coverage detected