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
Try Flow
// @flow type Foo = {| +foo: ?string |}; const test = (bar: Foo): Foo => ({ foo: 'foo', ...bar});
causes:
3: type Foo = {| +foo: ?string |}; ^ null or undefined [1] is incompatible with string [2]. References: 3: type Foo = {| +foo: ?string |}; ^ [1] 4: const test = (bar: Foo): Foo => ({ foo: 'foo', ...bar}); ^ [2]
This is very strange and frustrating issue, I think there is no any scenario that would make the error valid.
The error location is also very odd: It's in the type, not in the usage. this makes suppressing the error pretty non-optimal.
If I don't spread, the problem disappears.
This happens with all Flow versions.
Happens also without exactness or read-onlyness possibly undefined version works Unfortunately this is not what our type really is :/
The text was updated successfully, but these errors were encountered:
I'm suffering the same problem. This appears to have been a long standing bug in flow. See #5243
Sorry, something went wrong.
This no longer errors on master
No branches or pull requests
Try Flow
causes:
This is very strange and frustrating issue, I think there is no any scenario that would make the error valid.
The error location is also very odd: It's in the type, not in the usage. this makes suppressing the error pretty non-optimal.
If I don't spread, the problem disappears.
This happens with all Flow versions.
Happens also without exactness or read-onlyness
possibly undefined version works Unfortunately this is not what our type really is :/
The text was updated successfully, but these errors were encountered: