We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Given I have value of exact type A and want to transform it to exact type B using Object.assign
type Coordinates = {| lat: number, lon: number, |} type RawCoordinates = {| lat: number, lon: string, |} const c1: Coordinates = { lat: 1, lon: 2 } const c2: RawCoordinates = { lat: 1, lon: 'two' } const merged: RawCoordinates = Object.assign(c1, c2); const merged2: RawCoordinates = Object.assign({}, c1, c2);
How to avoid flow error using Object.assign/spread/ any other option of changing property type?
Try Flow
There are similar issues however they address reassigning object property to the value of the same type, while I need reassign to another type
The text was updated successfully, but these errors were encountered:
I think this would be solved by #7298
Sorry, something went wrong.
Going forward, we will likely only supporting object spreads well.
No branches or pull requests
Given I have value of exact type A and want to transform it to exact type B using Object.assign
How to avoid flow error using Object.assign/spread/ any other option of changing property type?
Try Flow
There are similar issues however they address reassigning object property to the value of the same type, while I need reassign to another type
The text was updated successfully, but these errors were encountered: