-
Notifications
You must be signed in to change notification settings - Fork 100
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
Export flow type definitions #160
Comments
@DEX3 Does flow ask you to type this component or only this lint rule? |
It's actually just because of the linter rule |
Well, I don't think If you have more thoughts on this, I will consider them. |
You are right that this makes sense from this point of view. I do however I think that a lot of people might actually be able to profit from the exported types (eslint-plugin-react is pretty popular and the rule is enabled in eslint-config-airbnb for example). Also one could argue about the types not really increasing the surface area of the API 😄, I mean the typescript types are already being exported, just the flowtypes are missing. I'm totally up for issuing a PR myself, would you accept the change? |
I just don't think prop-types make any sense with flow. These rules should be disabled. TypeScript types are all exported just because of lack of type inference. I was against this idea before. |
Just to be clear: the Having a rule that forces you to type your props (independent of whether you use |
Would it be possible to export all flow type definitions? Here's a use case:
This will make flow complain:
Which makes sense I guess. This can be fixed by pulling out the render explicitly:
But now, I have to type
render
(at least with thereact/prop-types
eslint-rule active).Sadly,
react-powerplug
does not currently export theValueRender
type which makes this hard to do... Could you export all flowtypes?The text was updated successfully, but these errors were encountered: