Skip to content
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

Enable noUncheckedIndexedAccess #2591

Open
raineorshine opened this issue Nov 15, 2024 · 0 comments
Open

Enable noUncheckedIndexedAccess #2591

raineorshine opened this issue Nov 15, 2024 · 0 comments
Labels
refactor Refactor without changing behavior

Comments

@raineorshine
Copy link
Contributor

Enable noUncheckedIndexedAccess in the tsconfig.

This would ensure that undefined indexing like state.thoughts.thoughtIndex[id] is properly typed. (Technically state.thoughts.thoughtIndex[id] should always be defined, since an id can only be known after it has been loaded into State. However, there are some cases where a thought is undefined after an async operation or unmount.)

Not sure how many files this will touch. Start by turning this on and seeing how many files are affected so we can assess the effort required.

@raineorshine raineorshine added the refactor Refactor without changing behavior label Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Refactor without changing behavior
Projects
None yet
Development

No branches or pull requests

1 participant