The setting noUncheckedIndexAccess impacts types such as type X = Record<string, T> or type X = { [key: string]: T }.
Without the setting turned on, the type of X.foo is T. With it turned on, the type of X.foo is T | undefined. The latter type better reflects reality, and leads to better type safety. However, turning on the setting will require a lot of updates to our code base.
The setting
noUncheckedIndexAccess
impacts types such astype X = Record<string, T>
ortype X = { [key: string]: T }
.Without the setting turned on, the type of
X.foo
isT
. With it turned on, the type ofX.foo
isT | undefined
. The latter type better reflects reality, and leads to better type safety. However, turning on the setting will require a lot of updates to our code base.