-
Notifications
You must be signed in to change notification settings - Fork 4k
Turn on the "noUncheckedIndexedAccess" flag in all TS config files #3587
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
…g-no-unchecked-indexed-access
…g-no-unchecked-indexed-access
…g-no-unchecked-indexed-access
…g-no-unchecked-indexed-access
noUncheckedIndexedAccess
flag ensures that accessing elements in arrays or objects doesn't result inundefined
ornull
, preventing a certain class of runtime errors. Without it, developers might overlook potentialnull
orundefined
values, leading to unexpected behaviors.I "properly" fixed existing errors that were obvious and easy to fix. I used
!
or the@ts-expect-error
directive for others to avoid spending too much time on this.The main idea is to avoid creating more problems in the future as the compiler will now start warning us.