Skip to content

Commit ef1cd50

Browse files
committed
clarifying comments
1 parent 293a04c commit ef1cd50

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/compiler/program.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ namespace ts {
499499
// so it is defined iff we already called the current function on `file`.
500500
// That call happened no later than the creation of the `file` object,
501501
// which per above occured during the current program creation.
502-
// Since we model program creation as an atomic operation w/r/t IO,
502+
// Since we assume the filesystem does not change during program creation,
503503
// it is safe to reuse resolutions from the earlier call.
504504
const result: ResolvedModuleFull[] = [];
505505
for (const moduleName of moduleNames) {
@@ -581,6 +581,8 @@ namespace ts {
581581
let j = 0;
582582
for (let i = 0; i < result.length; i++) {
583583
if (result[i]) {
584+
// `result[i]` is either a `ResolvedModuleFull` or a marker.
585+
// If it is the former, we can leave it as is.
584586
if (result[i] === predictedToResolveToAmbientModuleMarker) {
585587
result[i] = undefined;
586588
}

0 commit comments

Comments
 (0)