Skip to content

Commit 868cf3e

Browse files
committed
renames per PR feedback
1 parent cec1b0a commit 868cf3e

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

src/compiler/tsbuild.ts

+11-10
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ namespace ts {
3939

4040
invalidateProject(project: ResolvedConfigFileName, dependencyGraph: DependencyGraph | undefined): void;
4141
getNextInvalidatedProject(): ResolvedConfigFileName | undefined;
42-
pendingInvalidatedProjects(): boolean;
42+
hasPendingInvalidatedProjects(): boolean;
4343
missingRoots: Map<true>;
4444
}
4545

@@ -396,20 +396,21 @@ namespace ts {
396396
unchangedOutputs: createFileMap(),
397397
invalidateProject,
398398
getNextInvalidatedProject,
399-
pendingInvalidatedProjects,
399+
hasPendingInvalidatedProjects,
400400
missingRoots
401401
};
402402

403-
function invalidateProject(proj: ResolvedConfigFileName, dependancyGraph: DependencyGraph | undefined) {
403+
function invalidateProject(proj: ResolvedConfigFileName, dependencyGraph: DependencyGraph | undefined) {
404404
if (!projectPendingBuild.hasKey(proj)) {
405405
addProjToQueue(proj);
406-
if (dependancyGraph) {
407-
queueBuildForDownstreamReferences(proj, dependancyGraph);
406+
if (dependencyGraph) {
407+
queueBuildForDownstreamReferences(proj, dependencyGraph);
408408
}
409409
}
410410
}
411411

412412
function addProjToQueue(proj: ResolvedConfigFileName) {
413+
Debug.assert(!projectPendingBuild.hasKey(proj));
413414
projectPendingBuild.setValue(proj, true);
414415
invalidatedProjectQueue.push(proj);
415416
}
@@ -426,18 +427,18 @@ namespace ts {
426427
}
427428
}
428429

429-
function pendingInvalidatedProjects() {
430+
function hasPendingInvalidatedProjects() {
430431
return !!projectPendingBuild.getSize();
431432
}
432433

433434
// 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);
436437
for (const ref of deps) {
437438
// Can skip circular references
438439
if (!projectPendingBuild.hasKey(ref)) {
439440
addProjToQueue(ref);
440-
queueBuildForDownstreamReferences(ref, dependancyGraph);
441+
queueBuildForDownstreamReferences(ref, dependencyGraph);
441442
}
442443
}
443444
}
@@ -810,7 +811,7 @@ namespace ts {
810811
timerToBuildInvalidatedProject = undefined;
811812
const buildProject = context.getNextInvalidatedProject();
812813
buildSomeProjects(p => p === buildProject);
813-
if (context.pendingInvalidatedProjects()) {
814+
if (context.hasPendingInvalidatedProjects()) {
814815
if (!timerToBuildInvalidatedProject) {
815816
scheduleBuildInvalidatedProject();
816817
}

0 commit comments

Comments
 (0)