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(react-intl): add children typing to injectIntl #1716

Merged
merged 1 commit into from Jun 15, 2020

Conversation

pyrocat101
Copy link
Member

Fixes #1704.

This diff adds children type to the returning component type of the injectIntl, for the forward ref overload. By default, React.FC correctly types children, but this is not the case for React.ForwardRefExoticComponent. Simply adding the children type to the props for that overload fixes the type check issue.

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.

injectIntl return type omits children props
2 participants