File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -1017,13 +1017,14 @@ namespace ts {
1017
1017
1018
1018
// If array of references is changed, we cant resue old program
1019
1019
const oldProjectReferences = oldProgram . getProjectReferences ( ) ;
1020
- if ( ! arrayIsEqualTo ( oldProjectReferences ! , projectReferences , projectReferencesIsEqualTo ) ) {
1020
+ if ( ! arrayIsEqualTo ( oldProjectReferences ! , projectReferences , projectReferenceIsEqualTo ) ) {
1021
1021
return oldProgram . structureIsReused = StructureIsReused . Not ;
1022
1022
}
1023
1023
1024
1024
// Check the json files for the project references
1025
1025
const oldRefs = oldProgram . getResolvedProjectReferences ( ) ;
1026
1026
if ( projectReferences ) {
1027
+ // Resolved project referenced should be array if projectReferences provided are array
1027
1028
Debug . assert ( ! ! oldRefs ) ;
1028
1029
for ( let i = 0 ; i < projectReferences . length ; i ++ ) {
1029
1030
const oldRef = oldRefs ! [ i ] ;
@@ -1043,6 +1044,7 @@ namespace ts {
1043
1044
}
1044
1045
}
1045
1046
else {
1047
+ // Resolved project referenced should be undefined if projectReferences is undefined
1046
1048
Debug . assert ( ! oldRefs ) ;
1047
1049
}
1048
1050
Original file line number Diff line number Diff line change @@ -249,7 +249,7 @@ namespace ts {
249
249
sourceFile . resolvedTypeReferenceDirectiveNames . set ( typeReferenceDirectiveName , resolvedTypeReferenceDirective ) ;
250
250
}
251
251
252
- export function projectReferencesIsEqualTo ( oldRef : ProjectReference , newRef : ProjectReference ) {
252
+ export function projectReferenceIsEqualTo ( oldRef : ProjectReference , newRef : ProjectReference ) {
253
253
return oldRef . path === newRef . path &&
254
254
! oldRef . prepend === ! newRef . prepend &&
255
255
! oldRef . circular === ! newRef . circular ;
You can’t perform that action at this time.
0 commit comments