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

Fix flow types on withI18n #605

Merged
merged 1 commit into from
Jan 18, 2020
Merged

Fix flow types on withI18n #605

merged 1 commit into from
Jan 18, 2020

Conversation

ktunkiewicz
Copy link
Contributor

Hello guys,

I don't know how that works for others, but the existing flow types in withI18n throw a lot of errors in our project.
I figured out that the proposed change fixes this.

As far as I understand flowtype and the withI18n component, the return type is indeed React.ComponentType<$Diff<P, withI18nProps>> and not an intersection of C and the above.

Please take a look if it makes sense for you too.

Hello guys, I don't know how that works for others but the existing flow types in withI18n throw a lot of errors in our project.
I figured out that the proposed change fixes this.

As far as I understand flowtype and the withI18n component, the return type is indeed `React.ComponentType<$Diff<P, withI18nProps>>` and not an intersection of `C` and the above.

Please take a look if it makes sense for you too.
@vercel
Copy link

vercel bot commented Dec 20, 2019

This pull request is being automatically deployed with ZEIT Now (learn more).
To see the status of your deployment, click on the icon next to each commit.

@vercel vercel bot requested a deployment to staging December 20, 2019 13:07 Abandoned
@vercel
Copy link

vercel bot commented Dec 20, 2019

Deployment failed with the following error:

Your `package.json` file is missing a `build` property inside the `scripts` property.

@ktunkiewicz
Copy link
Contributor Author

duh.. ok Mr "now" bot, I admit, I didn't read any readme about contributing :)
I just used GitHub's "edit" function. Should I do something more to make this PR pass automated tests @tricoder42 ?

@tricoder42 tricoder42 merged commit a576659 into lingui:master Jan 18, 2020
@tricoder42
Copy link
Contributor

Thanks, this looks good!

@tricoder42
Copy link
Contributor

Fixed in v2.9.1. 🎉

@tricoder42
Copy link
Contributor

Unfortunatelly, these changes caused few flow errors. I had to disable flow linter in master, because I'm planning to remove flow completely in v3.

If you were interested fixing it, I've created branch feature/fix-flow with updated flow definitions.

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.

2 participants