-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Type errors when doing interpolation in react-typescript/simple #1598
Comments
Sorry, but I'm not able to reproduce it... |
@adrai Thanks for taking a look. So when checking out the new commit, It raises an error in VSCode only. Typescript does not fail to compile. If I then provide it a |
I am also seeing this problem on |
Any form of interpolation gives the "excessively deep" type error. |
This is with |
Hey @adr29truck, I also didn't manage to reproduce it, and I'm using the latest vscode version. My assumption is that there is a conflict with one of your vscode extensions. Could you share your extension list, please? |
In my experience, this issue occurs both in VS Code, and when running However, the moment I downgraded |
Exactly the same error here ... |
Update, I managed to make it work using this code: // Type instantiation is excessively deep and possibly infinite.ts(2589)
<div>
{t('key2', {count: myCounter})}
</div>
// No error
import {Trans, useTranslation} from 'react-i18next';
...
const {t} = useTranslation('key1');
...
<div>
{Trans({t, i18nKey: 'key2', count: myCounter})}
</div> |
I solved this by updating to at least |
Confirmed ! We could not use more than 45 namespace/ |
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. |
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. |
Well.. we still have problem ! We temporally fix the problem with the workaround 1 & 2 listed here : #1417 (comment). |
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. |
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. |
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. |
@adrai do we have any news about this issue ? It still compiles but still raises the possibly infinite error warning... |
Amazing, thanks a lot for the follow-up ! |
@MiryksV with the next major release this is fixed |
🐛 Bug Report
Using the simple react-typescript example and introducing a variable to interpolate in the translation file causes
Type instantiation is excessively deep and possibly infinite.
or'TFunctionDetailedResult<never>' is not assignable to type 'ReactI18NextChild | Iterable<ReactI18NextChild>'. Property '[Symbol.iterator]' is missing in type 'TFunctionDetailedResult<never>' but required in type 'Iterable<ReactI18NextChild>'
to be raisedTo Reproduce
Using the simple react-typescript example in this repo, introduce a variable in the translation file
then in
app.tsx
try accessingdescription.part1
using thet
function derived fromuseTranslation
.or
respectively.
See this commit adr29truck@24a615a on fork
Expected behavior
It should not raise type errors.
Your Environment
The text was updated successfully, but these errors were encountered: