noUncheckedIndexedAccess

An index signature can be used to describe an object that has unknown keys but known values. For example, the EnvironmentVars interface below may have any number of environment variables that are always string values.

Turning on noUncheckedIndexedAccess will add undefined to any property in the type that was not explicitly declared.

Was this page helpful?