You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recommend implementing as one coordinated change: define the rule (#258) + enforce it via strictNullChecks + audit pass (#271). Track as the same effort.
Rationale
TypeScript's strictNullChecks and noUncheckedIndexedAccess would catch many latent bugs caused by inconsistent null/undefined handling:
map.get(key) returns T | undefined under strict; many sites assume T.
Function returns typed X | null but caller uses result.foo without checking.
Effects of enabling strict mode:
Compile errors at many sites; each one is a real possible bug.
Forces the developer to handle the absence case explicitly.
Size / Priority
Status — overlaps with #258
This issue and #258 describe the same problem from slightly different angles:
Option<X>vsX | undefinedvsX | nullper use case.Recommend implementing as one coordinated change: define the rule (#258) + enforce it via
strictNullChecks+ audit pass (#271). Track as the same effort.Rationale
TypeScript's
strictNullChecksandnoUncheckedIndexedAccesswould catch many latent bugs caused by inconsistent null/undefined handling:map.get(key)returnsT | undefinedunder strict; many sites assumeT.X | nullbut caller usesresult.foowithout checking.Effects of enabling strict mode:
Implementation
strictNullChecks(likely already on) +noUncheckedIndexedAccess(likely off).Integration / risk
Test plan
tsc.Acceptance criteria
noUncheckedIndexedAccess: truein tsconfig (or per-module override if scope too large).Pre-implementation note
Pair with #258 for one coordinated effort. Significant work — multi-week.