From cee9f40fd9d069e3e08e337b59df578fb50d57cd Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Wed, 2 Jun 2021 16:38:24 -0700 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Daniel Rosenwasser --- src/compiler/builder.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/compiler/builder.ts b/src/compiler/builder.ts index 67b1232b1a3..d4d7327fbd7 100644 --- a/src/compiler/builder.ts +++ b/src/compiler/builder.ts @@ -856,9 +856,10 @@ namespace ts { const optionKey = name.toLowerCase(); const optionInfo = optionsNameMap.get(optionKey); if (optionInfo?.affectsEmit || optionInfo?.affectsSemanticDiagnostics || - // Since we should never compare strict directly between options but individual flag, but it does change value of that flag so store it + // We need to store `strict`, even though it won't be examined directly, so that the + // flags it controls (e.g. `strictNullChecks`) will be retrieved correctly from the buildinfo optionKey === "strict" || - // These affect if lib files need to be rechecked so store them + // We need to store these to determine whether `lib` files need to be rechecked. optionKey === "skiplibcheck" || optionKey === "skipdefaultlibcheck") { (result ||= {})[name] = convertToReusableCompilerOptionValue( optionInfo,