Recently I ran into an interesting example of how the flow is interpreting the values without the provided defined type.
So if to use Object.assign
flow assumes that shapes of all other arguments in the assign
are the same as the first argument.
There are two ways how to overcome this type of limitation.
- Use spreading instead
- Assign all values to initial empty object