-
-
Notifications
You must be signed in to change notification settings - Fork 628
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
TypeScript Error TS2558 after upgrade to v23: Expected 3-4 type arguments, but got 1 #2029
Comments
Make sure you updated not only i18next but also react-i18next. |
HI @adrai, EDIT: The codeline in my pervious message was incorrect, I am actually using this implementation: I have upgraded the following packages: The issue is still remaining. Before creating codesandbox, would I need to add more configurations to the i18n,js file? |
I don't think so. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@adrianui5, Could you share a reproducible example? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Hello,
I was using this implementation of i18next for my react components:
this.props.t!("test_page.area")
Now after upgrading to version 23.0.0, I am facing this issue:
Type 'TOpt["returnObjects"] extends true ? $SpecialObject : string' is not assignable to type 'ReactI18NextChildren'.
Type 'string | $SpecialObject' is not assignable to type 'ReactI18NextChildren'.
Type 'object' is not assignable to type 'ReactI18NextChildren'.
Type 'TOpt["returnObjects"] extends true ? $SpecialObject : string' is not assignable to type 'ReactPortal'.ts(2322)
index.d.ts(47, 5): The expected type comes from property 'children' which is declared here on type 'DetailedHTMLProps<TdHTMLAttributes, HTMLTableDataCellElement>'
Expected 3-4 type arguments, but got 1.ts(2558)
When removing the , I am ending up with an eslint issue:
Forbidden non-null assertion
Now I am asking myself, how do I need to change my coding to meet the new syntax requirements?
Thanks,
Adrian
The text was updated successfully, but these errors were encountered: