3 ms·
> What do you mean it's not possible to work around libraries and APIs returning nulls? That's exactly the point I made, Flow solved it. Sorry, I had the reall
by the_gipsy 12y ago
> What do you mean it's not possible to work around libraries and APIs returning nulls? That's exactly the point I made, Flow solved it.
Sorry, I had the really stupid misconception that Maybe Types could not be applied to libraries and browser APIs.
So it seems like a good start, but it doesn't seem really useful if they aren't even in the basic API's descriptions: https://github.com/facebook/flow/blob/master/lib/dom.js#L198 https://github.com/facebook/flow/blob/master/lib/dom.js#L198
- k_bx 12y agoIf something might return null -- feel free to make a PR with making it a Maybe type, like here: https://github.com/facebook/flow/blob/master/lib/dom.js#L359 https://github.com/facebook/flow/blob/master/lib/dom.js#L359