-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
[v2.0] react-select v2 Missing type annotation for U #2716
Comments
Hi @Erkan1991 which version of flow are you running? |
Hi @gwyneplaine, the flow version i'm running is File:
|
@Erkan1991 but the current flow version is 0.74, try to upgrade flow and run it again |
I'm hitting the same issue (was about to create an issue but found this one) and I'm running the latest version of Flow.
It does appear the above typed solution works properly, and avoids the error in question. I'll fork and submit a PR for this change. |
[v2] Fix for #2716 - Missing type annotation for U.
@Erkan1991 If you use a return at this point, i guess you are in a function. The solution is to not let flow infer the return type, and specify it manually : function yourFunction(array) : Array<any> {
return array.map( ... );
} Kind of the same solution you found, but without modifying your code. |
Hi, I faced the same issue. // Error
class Foo {
id: number
toParams {
return {
id: this.id
}
}
} // No Error
class Foo {
id: number
toParams: Object {
return {
id: this.id
}
}
} Hope this helps. Thanks |
Fixed in #2646 |
Hello - In an effort to sustain the We understand this might be inconvenient but in the best interest of supporting the broader community we have to direct our limited efforts to maintain the latest version. If you aren't using the latest version of However, if you feel this issue is still relevant and you'd like us to review it - please leave a comment and we'll do our best to get back to you! |
Hi, I'm getting the below error when running flow. Could someone please advise ?
Environment
OS: macOS High Seirra - Version 10.13.4
Node version: v9.6.1
NPM version: 5.7.1
The text was updated successfully, but these errors were encountered: