TsConfig Settings
Compiler Options
Always use strict
noUncheckedIndexedAccess
When enabled, accessing someNumbers[i] gives us a number | undefined back rather than just a number. This forces us to check for undefined whenever we access an array element by its index, which is more annoying but also more safe. Each team needs to decide whether the added safety is worth the hassle or not.
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?