For an unknown index into a tuple, Flow neglects potential void types resulting from out of bounds access
Open
Typing: tuple
- Dominant language
- Rust
- Stars
- 22.3k
- Forks
- 1.9k
- PR merge metrics
- No merged PRs in 30d
Description
The tuple docs claim that "If Flow doesn’t know which index you are trying to access it will return all possible types," but Flow neglects the possible void type:
```js
declare var p: [number];
declare var n: number;
(p[n]: number); //ng, but Flow passes.
(p[n]: number | void); //ok
```
Contributor guide
Assessment
This issue has not been assessed yet.