Tip
Use noUncheckedIndexedAccess TypeScript Compiler Option and Improve Type-Safety
TypeScript doesn't track both the length of the array and its index access. We can change that with the `nouncheckedindexedaccess` flag and explore TypeScripts new behavior.
TypeScript doesn't track both the length of the array and its index access. This can lead to rather troublesome bugs, especially, when developers falsely assume the correctness of their code, being unaware of the default behavior. However, there is a compiler option that can change the default compiler behavior.