TsConfig Settings
Compiler Options
Always use strict
noUncheckedIndexedAccess
When enabled, accessing someNumbers[i] gives us a number | undefined, not a number. We must check for undefined whenever we access an array element by index. Each team must decide whether the added safety is worth the extra checks.
Questions
Which engineering decision related to this topic has the highest switching cost once made — and how do you make it well with incomplete information?
- At what scale or complexity level does the right answer to this topic change significantly?
- How does the introduction of AI-native workflows change the conventional wisdom about this technology?
- Which anti-pattern in this area is most commonly introduced by developers who know enough to be dangerous but not enough to know what they don't know?