From 835153ba50f08801ea507686721eead349a560a8 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Mon, 2 Oct 2017 12:22:05 -0700 Subject: [PATCH] PR feedback --- src/compiler/builder.ts | 2 +- src/compiler/program.ts | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/compiler/builder.ts b/src/compiler/builder.ts index 9436be6e8a1..b2cdad3598a 100644 --- a/src/compiler/builder.ts +++ b/src/compiler/builder.ts @@ -521,7 +521,7 @@ namespace ts { } // Return array of values that needs emit - return arrayFrom(seenFileNamesMap.values()); + return flatMapIter(seenFileNamesMap.values(), value => value); } } } diff --git a/src/compiler/program.ts b/src/compiler/program.ts index d335ef3df85..ee1e2ea28fe 100755 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -764,8 +764,7 @@ namespace ts { for (let i = 0; i < moduleNames.length; i++) { const moduleName = moduleNames[i]; - // If we want to reuse resolutions more aggressively, we can refine this to check for whether the - // text of the corresponding modulenames has changed. + // If the source file is unchanged and doesnt have invalidated resolution, reuse the module resolutions if (file === oldSourceFile && !hasInvalidatedResolution(oldSourceFile.path)) { const oldResolvedModule = oldSourceFile && oldSourceFile.resolvedModules.get(moduleName); if (oldResolvedModule) {