File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1017,13 +1017,14 @@ namespace ts {
10171017
10181018 // If array of references is changed, we cant resue old program
10191019 const oldProjectReferences = oldProgram . getProjectReferences ( ) ;
1020- if ( ! arrayIsEqualTo ( oldProjectReferences ! , projectReferences , projectReferencesIsEqualTo ) ) {
1020+ if ( ! arrayIsEqualTo ( oldProjectReferences ! , projectReferences , projectReferenceIsEqualTo ) ) {
10211021 return oldProgram . structureIsReused = StructureIsReused . Not ;
10221022 }
10231023
10241024 // Check the json files for the project references
10251025 const oldRefs = oldProgram . getResolvedProjectReferences ( ) ;
10261026 if ( projectReferences ) {
1027+ // Resolved project referenced should be array if projectReferences provided are array
10271028 Debug . assert ( ! ! oldRefs ) ;
10281029 for ( let i = 0 ; i < projectReferences . length ; i ++ ) {
10291030 const oldRef = oldRefs ! [ i ] ;
@@ -1043,6 +1044,7 @@ namespace ts {
10431044 }
10441045 }
10451046 else {
1047+ // Resolved project referenced should be undefined if projectReferences is undefined
10461048 Debug . assert ( ! oldRefs ) ;
10471049 }
10481050
Original file line number Diff line number Diff line change @@ -249,7 +249,7 @@ namespace ts {
249249 sourceFile . resolvedTypeReferenceDirectiveNames . set ( typeReferenceDirectiveName , resolvedTypeReferenceDirective ) ;
250250 }
251251
252- export function projectReferencesIsEqualTo ( oldRef : ProjectReference , newRef : ProjectReference ) {
252+ export function projectReferenceIsEqualTo ( oldRef : ProjectReference , newRef : ProjectReference ) {
253253 return oldRef . path === newRef . path &&
254254 ! oldRef . prepend === ! newRef . prepend &&
255255 ! oldRef . circular === ! newRef . circular ;
You can’t perform that action at this time.
0 commit comments