Re:Node.js adds experimental support for TypeScript
by recursive on Friday July 26, 2024 @10:31AM
(#41078932)
> How do you recommend a compiler to detect out-of-bounds at compile time?
I wouldn't make the recommendation that they do at all. Full soundness is not my thing. But... if Flow wanted to do it, it would have to change the type of indexing into `(Element[])[number]` with a read from `Element` to `Element | undefined`.
I wouldn't make the recommendation that they do at all. Full soundness is not my thing. But... if Flow wanted to do it, it would have to change the type of indexing into `(Element[])[number]` with a read from `Element` to `Element | undefined`.