@@ -39,7 +39,7 @@ namespace ts {
39
39
40
40
invalidateProject ( project : ResolvedConfigFileName , dependencyGraph : DependencyGraph | undefined ) : void ;
41
41
getNextInvalidatedProject ( ) : ResolvedConfigFileName | undefined ;
42
- pendingInvalidatedProjects ( ) : boolean ;
42
+ hasPendingInvalidatedProjects ( ) : boolean ;
43
43
missingRoots : Map < true > ;
44
44
}
45
45
@@ -396,20 +396,21 @@ namespace ts {
396
396
unchangedOutputs : createFileMap ( ) ,
397
397
invalidateProject,
398
398
getNextInvalidatedProject,
399
- pendingInvalidatedProjects ,
399
+ hasPendingInvalidatedProjects ,
400
400
missingRoots
401
401
} ;
402
402
403
- function invalidateProject ( proj : ResolvedConfigFileName , dependancyGraph : DependencyGraph | undefined ) {
403
+ function invalidateProject ( proj : ResolvedConfigFileName , dependencyGraph : DependencyGraph | undefined ) {
404
404
if ( ! projectPendingBuild . hasKey ( proj ) ) {
405
405
addProjToQueue ( proj ) ;
406
- if ( dependancyGraph ) {
407
- queueBuildForDownstreamReferences ( proj , dependancyGraph ) ;
406
+ if ( dependencyGraph ) {
407
+ queueBuildForDownstreamReferences ( proj , dependencyGraph ) ;
408
408
}
409
409
}
410
410
}
411
411
412
412
function addProjToQueue ( proj : ResolvedConfigFileName ) {
413
+ Debug . assert ( ! projectPendingBuild . hasKey ( proj ) ) ;
413
414
projectPendingBuild . setValue ( proj , true ) ;
414
415
invalidatedProjectQueue . push ( proj ) ;
415
416
}
@@ -426,18 +427,18 @@ namespace ts {
426
427
}
427
428
}
428
429
429
- function pendingInvalidatedProjects ( ) {
430
+ function hasPendingInvalidatedProjects ( ) {
430
431
return ! ! projectPendingBuild . getSize ( ) ;
431
432
}
432
433
433
434
// Mark all downstream projects of this one needing to be built "later"
434
- function queueBuildForDownstreamReferences ( root : ResolvedConfigFileName , dependancyGraph : DependencyGraph ) {
435
- const deps = dependancyGraph . dependencyMap . getReferencesTo ( root ) ;
435
+ function queueBuildForDownstreamReferences ( root : ResolvedConfigFileName , dependencyGraph : DependencyGraph ) {
436
+ const deps = dependencyGraph . dependencyMap . getReferencesTo ( root ) ;
436
437
for ( const ref of deps ) {
437
438
// Can skip circular references
438
439
if ( ! projectPendingBuild . hasKey ( ref ) ) {
439
440
addProjToQueue ( ref ) ;
440
- queueBuildForDownstreamReferences ( ref , dependancyGraph ) ;
441
+ queueBuildForDownstreamReferences ( ref , dependencyGraph ) ;
441
442
}
442
443
}
443
444
}
@@ -810,7 +811,7 @@ namespace ts {
810
811
timerToBuildInvalidatedProject = undefined ;
811
812
const buildProject = context . getNextInvalidatedProject ( ) ;
812
813
buildSomeProjects ( p => p === buildProject ) ;
813
- if ( context . pendingInvalidatedProjects ( ) ) {
814
+ if ( context . hasPendingInvalidatedProjects ( ) ) {
814
815
if ( ! timerToBuildInvalidatedProject ) {
815
816
scheduleBuildInvalidatedProject ( ) ;
816
817
}
0 commit comments