oxidecomputer / oxidecomputer/console
Turn on TS config option `noUncheckedIndexedAccess`
Open
Nobody has claimed this yet.
tools
- Dominant language
- TypeScript
- Stars
- 228
- Forks
- 22
- Avg merge
- 19h 42m
- Merged PRs (30d)
- 32
Description
There are 86 errors when I try it, so it's non-trivial. But I think it's a good check. Basically it makes array[0] have type T | undefined unless you've checked that the array is not empty.
https://www.typescriptlang.org/tsconfig#noUncheckedIndexedAccess
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the repository's TypeScript configuration and run the compiler with noUncheckedIndexedAccess enabled to reproduce the 86 errors. Review the affected code and resolve the reported undefined-access cases; the work is done when the option is enabled without remaining type errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- build-system
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100