Skip to content
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

Reduce amount of generic type #17

Merged
merged 1 commit into from
Dec 26, 2018

Conversation

SBoudrias
Copy link
Contributor

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.

export default translate<typeof Comp>(Comp);

Copy link
Contributor

@xunuoi xunuoi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, typeof Com is simple enough for us👍

@SBoudrias SBoudrias merged commit 1ad934e into master Dec 26, 2018
@SBoudrias SBoudrias deleted the update/reduce-generic-types-in-input-position branch December 26, 2018 04:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants