-
Notifications
You must be signed in to change notification settings - Fork 7
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
Update types to use React.AbstractComponent #16
Conversation
Restore the Then it could check the flow type for static props |
Done, I had to re-adjust the type to make this case pass properly. |
Actually had to remove the static types/WrappedComponent, it unfortunately didn't work in many cases :( |
@SBoudrias You mean even the latest Flow doesn't support static props of HOC well? 😰 |
At least now it does type validation; as previously it'd silently |
@SBoudrias You mean the |
This PR is trying to reach a middle step between current status and the status of #16 By removing the second generic type, we actually add extra coverage around the locations where the context cause flow to silently set the type to `any`. (this catched 15 errors on our main repo) And it'll allow us to easily fill in the generic type manually in order to be 100% sure the types aren't `any`. This will make it easily usable with both flow 0.84 and and 0.89. ```js export default translate<typeof Comp>(Comp); ```
Bump to 0.89 with the new HOC helper.