Skip to content

Commit cee9f40

Browse files
Apply suggestions from code review
Co-authored-by: Daniel Rosenwasser <[email protected]>
1 parent d3b479e commit cee9f40

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/compiler/builder.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -856,9 +856,10 @@ namespace ts {
856856
const optionKey = name.toLowerCase();
857857
const optionInfo = optionsNameMap.get(optionKey);
858858
if (optionInfo?.affectsEmit || optionInfo?.affectsSemanticDiagnostics ||
859-
// Since we should never compare strict directly between options but individual flag, but it does change value of that flag so store it
859+
// We need to store `strict`, even though it won't be examined directly, so that the
860+
// flags it controls (e.g. `strictNullChecks`) will be retrieved correctly from the buildinfo
860861
optionKey === "strict" ||
861-
// These affect if lib files need to be rechecked so store them
862+
// We need to store these to determine whether `lib` files need to be rechecked.
862863
optionKey === "skiplibcheck" || optionKey === "skipdefaultlibcheck") {
863864
(result ||= {})[name] = convertToReusableCompilerOptionValue(
864865
optionInfo,

0 commit comments

Comments
 (0)