From ef1cd50dfc71c99fff469c12ac58bac8fe663734 Mon Sep 17 00:00:00 2001 From: Arthur Ozga Date: Mon, 1 May 2017 11:47:12 -0700 Subject: [PATCH] clarifying comments --- src/compiler/program.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/compiler/program.ts b/src/compiler/program.ts index c44fdce391e..4ef1d7939c6 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -499,7 +499,7 @@ namespace ts { // so it is defined iff we already called the current function on `file`. // That call happened no later than the creation of the `file` object, // which per above occured during the current program creation. - // Since we model program creation as an atomic operation w/r/t IO, + // Since we assume the filesystem does not change during program creation, // it is safe to reuse resolutions from the earlier call. const result: ResolvedModuleFull[] = []; for (const moduleName of moduleNames) { @@ -581,6 +581,8 @@ namespace ts { let j = 0; for (let i = 0; i < result.length; i++) { if (result[i]) { + // `result[i]` is either a `ResolvedModuleFull` or a marker. + // If it is the former, we can leave it as is. if (result[i] === predictedToResolveToAmbientModuleMarker) { result[i] = undefined; }