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

Spread with undefined and exact objects #7616

Closed
stropho opened this issue Apr 5, 2019 · 5 comments
Closed

Spread with undefined and exact objects #7616

stropho opened this issue Apr 5, 2019 · 5 comments

Comments

@stropho
Copy link

stropho commented Apr 5, 2019

I found a couple of issues with spread operator but most of them seem to have problem with optional values ( #7210 ). This is not the case. The problem is that undefined behaves magically like any

Flow version:
0.96 - and many versions before

Expected behavior

undefined is incompatible with string

Actual behavior

See the following snippet

@lll000111
Copy link
Contributor

lll000111 commented Apr 5, 2019

Just for fun, here is the same sample code with TypeScript (works as expected there). I use (only) Flow, I'm just curious what the state of the two JS-type projects is.

@mrkev
Copy link
Contributor

mrkev commented Apr 5, 2019

I think @jbrown215 is working around spreads right now, he might want to have a look at this.

@jbrown215
Copy link
Contributor

This will be solved when my current project lands. Thanks for the example!

@stropho
Copy link
Author

stropho commented Apr 16, 2019

@jbrown215 any approximate time estimate ?

@nmote
Copy link
Contributor

nmote commented Oct 25, 2019

The fixes for spreads have landed, and this has the expected behavior in master.

@nmote nmote closed this as completed Oct 25, 2019
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

6 participants