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

BUG: Tuple types are not correctly inferred from literals. #6111

Open
leebyron opened this issue Apr 6, 2018 · 0 comments
Open

BUG: Tuple types are not correctly inferred from literals. #6111

leebyron opened this issue Apr 6, 2018 · 0 comments

Comments

@leebyron
Copy link
Contributor

leebyron commented Apr 6, 2018

I've encountered this a bug (or at least, @calebmer told me it's a bug) where tuple types are not correctly inferred, so the only way to correct a flow error is to manually add in the type - which can get verbose.

Here's an example where I'm attempting to deeply "unwrap" polymorphic classes with the type they contain.

This pattern appears in both Immutable.js conversion functions and TestCheck.js generator functions, and I'd love to get them properly typed.

leebyron/testcheck-js#79 tracks this particular bug's limitation on TestCheck.js's types.

Any ideas, @avikchaudhuri or @samwgoldman?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants