-
Notifications
You must be signed in to change notification settings - Fork 2k
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
fix all errors with flow 0.28 #420
Conversation
Confirmed its a bug in Nuclide which recursive types may be displayed as
Nuclide will display So it is suitable to update |
Thanks so much for investigating this! Ideally we introduce as little runtime code as possible when fixing flow errors - I'm not sure this warrants the new utility functions you've added. Lets attempt to solve the type errors just with better types first. |
Flow 0.28 landed @iamchenxin may be you make another try with 0.28 and it helps find simpler solution. |
@leebyron Sure, Static Type is always best, Let me take a look at new master. and will add a |
@nodkz let me take a look at 0.28. There are some inner API in facebook,like React using some of them. Maybe some of those inner API will have some magic effects to get things work. |
@leebyron Update this PR with new master.Marked all Type conflicts with checks. Some of them are things should be check. Maybe should consider to restrict using functions like Keep the GraphQLType still use any ,should update it to * later.
if change 'GraphQLList' to |
Thanks again for looking into this. I think given the current state of things there should be an easier path to gaining flow 0.28 support, I'll investigate |
Closing since the upgrade ended up being pretty straight forward after the other improvements to type checking were made elsewhere for v0.27 |
Fix all errors(update Flow to 0.27), will write unit test later.(flow 0.27 errors motioned in #412 )
And keep
GraphQLType
to a normal type (not update it to a recursive type):cause in flow 0.27
GraphQLList<GraphQLType>
was still resolved toGraphQLList<any>
,seems its no difference betweenGraphQLList
andGraphQLList<GraphQLType>
. I am asking this behaviors in flow/issues/2024, will test this tomorrow, theany
type should be cleaned.