()
| 117184 | } |
| 117185 | } |
| 117186 | function canReuseProjectReferences() { |
| 117187 | return !forEachProjectReference(oldProgram.getProjectReferences(), oldProgram.getResolvedProjectReferences(), function (oldResolvedRef, parent, index) { |
| 117188 | var newRef = (parent ? parent.commandLine.projectReferences : projectReferences)[index]; |
| 117189 | var newResolvedRef = parseProjectReferenceConfigFile(newRef); |
| 117190 | if (oldResolvedRef) { |
| 117191 | // Resolved project reference has gone missing or changed |
| 117192 | return !newResolvedRef || |
| 117193 | newResolvedRef.sourceFile !== oldResolvedRef.sourceFile || |
| 117194 | !ts.arrayIsEqualTo(oldResolvedRef.commandLine.fileNames, newResolvedRef.commandLine.fileNames); |
| 117195 | } |
| 117196 | else { |
| 117197 | // A previously-unresolved reference may be resolved now |
| 117198 | return newResolvedRef !== undefined; |
| 117199 | } |
| 117200 | }, function (oldProjectReferences, parent) { |
| 117201 | // If array of references is changed, we cant resue old program |
| 117202 | var newReferences = parent ? getResolvedProjectReferenceByPath(parent.sourceFile.path).commandLine.projectReferences : projectReferences; |
| 117203 | return !ts.arrayIsEqualTo(oldProjectReferences, newReferences, ts.projectReferenceIsEqualTo); |
| 117204 | }); |
| 117205 | } |
| 117206 | function tryReuseStructureFromOldProgram() { |
| 117207 | var _a; |
| 117208 | if (!oldProgram) { |
no test coverage detected
searching dependent graphs…