@@ -38,7 +38,7 @@ namespace ts {
3838
3939 invalidateProject ( project : ResolvedConfigFileName , dependencyGraph : DependencyGraph | undefined ) : void ;
4040 getNextInvalidatedProject ( ) : ResolvedConfigFileName | undefined ;
41- pendingInvalidatedProjects ( ) : boolean ;
41+ hasPendingInvalidatedProjects ( ) : boolean ;
4242 missingRoots : Map < true > ;
4343 }
4444
@@ -395,20 +395,21 @@ namespace ts {
395395 unchangedOutputs : createFileMap ( ) ,
396396 invalidateProject,
397397 getNextInvalidatedProject,
398- pendingInvalidatedProjects ,
398+ hasPendingInvalidatedProjects ,
399399 missingRoots
400400 } ;
401401
402- function invalidateProject ( proj : ResolvedConfigFileName , dependancyGraph : DependencyGraph | undefined ) {
402+ function invalidateProject ( proj : ResolvedConfigFileName , dependencyGraph : DependencyGraph | undefined ) {
403403 if ( ! projectPendingBuild . hasKey ( proj ) ) {
404404 addProjToQueue ( proj ) ;
405- if ( dependancyGraph ) {
406- queueBuildForDownstreamReferences ( proj , dependancyGraph ) ;
405+ if ( dependencyGraph ) {
406+ queueBuildForDownstreamReferences ( proj , dependencyGraph ) ;
407407 }
408408 }
409409 }
410410
411411 function addProjToQueue ( proj : ResolvedConfigFileName ) {
412+ Debug . assert ( ! projectPendingBuild . hasKey ( proj ) ) ;
412413 projectPendingBuild . setValue ( proj , true ) ;
413414 invalidatedProjectQueue . push ( proj ) ;
414415 }
@@ -425,18 +426,18 @@ namespace ts {
425426 }
426427 }
427428
428- function pendingInvalidatedProjects ( ) {
429+ function hasPendingInvalidatedProjects ( ) {
429430 return ! ! projectPendingBuild . getSize ( ) ;
430431 }
431432
432433 // Mark all downstream projects of this one needing to be built "later"
433- function queueBuildForDownstreamReferences ( root : ResolvedConfigFileName , dependancyGraph : DependencyGraph ) {
434- const deps = dependancyGraph . dependencyMap . getReferencesTo ( root ) ;
434+ function queueBuildForDownstreamReferences ( root : ResolvedConfigFileName , dependencyGraph : DependencyGraph ) {
435+ const deps = dependencyGraph . dependencyMap . getReferencesTo ( root ) ;
435436 for ( const ref of deps ) {
436437 // Can skip circular references
437438 if ( ! projectPendingBuild . hasKey ( ref ) ) {
438439 addProjToQueue ( ref ) ;
439- queueBuildForDownstreamReferences ( ref , dependancyGraph ) ;
440+ queueBuildForDownstreamReferences ( ref , dependencyGraph ) ;
440441 }
441442 }
442443 }
@@ -809,7 +810,7 @@ namespace ts {
809810 timerToBuildInvalidatedProject = undefined ;
810811 const buildProject = context . getNextInvalidatedProject ( ) ;
811812 buildSomeProjects ( p => p === buildProject ) ;
812- if ( context . pendingInvalidatedProjects ( ) ) {
813+ if ( context . hasPendingInvalidatedProjects ( ) ) {
813814 if ( ! timerToBuildInvalidatedProject ) {
814815 scheduleBuildInvalidatedProject ( ) ;
815816 }
0 commit comments