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

Function getNextAffectedFilePendingEmit

test/fixtures/snapshot/typescript.js:120300–120319  ·  view source on GitHub ↗

* Returns next file to be emitted from files that retrieved semantic diagnostics but did not emit yet

(state)

Source from the content-addressed store, hash-verified

120298 * Returns next file to be emitted from files that retrieved semantic diagnostics but did not emit yet
120299 */
120300 function getNextAffectedFilePendingEmit(state) {
120301 var affectedFilesPendingEmit = state.affectedFilesPendingEmit;
120302 if (affectedFilesPendingEmit) {
120303 var seenEmittedFiles = (state.seenEmittedFiles || (state.seenEmittedFiles = new ts.Map()));
120304 for (var i = state.affectedFilesPendingEmitIndex; i < affectedFilesPendingEmit.length; i++) {
120305 var affectedFile = ts.Debug.checkDefined(state.program).getSourceFileByPath(affectedFilesPendingEmit[i]);
120306 if (affectedFile) {
120307 var seenKind = seenEmittedFiles.get(affectedFile.resolvedPath);
120308 var emitKind = ts.Debug.checkDefined(ts.Debug.checkDefined(state.affectedFilesPendingEmitKind).get(affectedFile.resolvedPath));
120309 if (seenKind === undefined || seenKind < emitKind) {
120310 // emit this file
120311 state.affectedFilesPendingEmitIndex = i;
120312 return { affectedFile: affectedFile, emitKind: emitKind };
120313 }
120314 }
120315 }
120316 clearAffectedFilesPendingEmit(state);
120317 }
120318 return undefined;
120319 }
120320 function removeDiagnosticsOfLibraryFiles(state) {
120321 if (!state.cleanedDiagnosticsOfLibFiles) {
120322 state.cleanedDiagnosticsOfLibFiles = true;

Callers 1

emitNextAffectedFileFunction · 0.85

Calls 2

getMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…