I found a couple of issues with spread operator but most of them seem to have problem with optional values ( https://github.com/facebook/flow/issues/7210 ). This is not the case. The problem is that undefined behaves magically like any
Flow version:
0.96 - and many versions before
undefined is incompatible with string
See the following snippet
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.
I think @jbrown215 is working around spreads right now, he might want to have a look at this.
This will be solved when my current project lands. Thanks for the example!
@jbrown215 any approximate time estimate ?
The fixes for spreads have landed, and this has the expected behavior in master.
Most helpful comment
This will be solved when my current project lands. Thanks for the example!