* 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)
| 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 | */ |
no test coverage detected