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 error for typescript 4.6 #1463

Merged
merged 2 commits into from
Mar 7, 2022
Merged

Conversation

pedrodurek
Copy link
Member

Closes #1459 and bump ts version

Checklist

  • only relevant code is changed (make a diff before you submit the PR)
  • run tests npm run test
  • tests are included

Checklist (for documentation change)

  • only relevant documentation part is changed (make a diff before you submit the PR)
  • motivation/reason is provided

@@ -327,7 +327,7 @@ export function withTranslation<N extends Namespace = DefaultNamespace>(
withRef?: boolean;
},
): <
C extends React.ComponentType<React.ComponentProps<C> & WithTranslationProps>,
Copy link
Member Author

@pedrodurek pedrodurek Mar 7, 2022

Choose a reason for hiding this comment

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

The constrain should not rely on its on generics, this breaks on typescript 4.6 as C becomes unknown rather than any in the first instance

@coveralls
Copy link

Coverage Status

Coverage remained the same at 96.057% when pulling 014249a on pedrodurek:fix-typescript-4.6 into 10f8512 on i18next:master.

@adrai adrai merged commit 306e03a into i18next:master Mar 7, 2022
@adrai
Copy link
Member

adrai commented Mar 7, 2022

included in v11.15.6

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.

Type error with typescript 4.6
3 participants