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

Function doneWithAffectedFile

test/fixtures/snapshot/typescript.js:120491–120512  ·  view source on GitHub ↗

* This is called after completing operation on the next affected file. * The operations here are postponed to ensure that cancellation during the iteration is handled correctly

(state, affected, emitKind, isPendingEmit, isBuildInfoEmit)

Source from the content-addressed store, hash-verified

120489 * The operations here are postponed to ensure that cancellation during the iteration is handled correctly
120490 */
120491 function doneWithAffectedFile(state, affected, emitKind, isPendingEmit, isBuildInfoEmit) {
120492 if (isBuildInfoEmit) {
120493 state.buildInfoEmitPending = false;
120494 }
120495 else if (affected === state.program) {
120496 state.changedFilesSet.clear();
120497 state.programEmitComplete = true;
120498 }
120499 else {
120500 state.seenAffectedFiles.add(affected.resolvedPath);
120501 if (emitKind !== undefined) {
120502 (state.seenEmittedFiles || (state.seenEmittedFiles = new ts.Map())).set(affected.resolvedPath, emitKind);
120503 }
120504 if (isPendingEmit) {
120505 state.affectedFilesPendingEmitIndex++;
120506 state.buildInfoEmitPending = true;
120507 }
120508 else {
120509 state.affectedFilesIndex++;
120510 }
120511 }
120512 }
120513 /**
120514 * Returns the result with affected file
120515 */

Callers 3

toAffectedFileResultFunction · 0.85
toAffectedFileEmitResultFunction · 0.85

Calls 3

clearMethod · 0.65
addMethod · 0.65
setMethod · 0.45

Tested by

no test coverage detected