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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot find namespace 'i18next' #1361
Comments
WithNamespaces is very old |
We definitely plan to upgrade, but it's an old and big project, so changing all the |
<= v9 is not supported anymore, so you have only advantages ;-) |
@pedrodurek another reason why I would prefer to split the types... |
I was on vacation 馃槄. @adrai I didn't get your question, could you clarify a little bit more? |
Welcome back @pedrodurek 馃槈. Do you remember, some time ago we discussed if there was a possibility to have the types defined each in the appropriate module, so i18next would not need to be updated im case a TypeScript change in the react-i18next interface is done. |
As answered on the other issue, build-in types are always preferable. I've already faced some issues with external types and type augmentation, where the internal type definitions were being ignored in favour of the external library. |
Hey @JuhG, let me know if the issue was fixed after updating the libraries |
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. |
馃悰 Bug Report
Using version 9.0.10 typescript is complaining, that the function t is not typed. We're using the type WithNamespaces, but for some reason it didn't contain the types coming from i18next. Checking the type file, it looks like this:
Cannot find namespace 'i18next' - somehow importing the types is not working.
Changing
import i18next from 'i18next';
to
import * as i18next from 'i18next';
seem to resolve it.
Sorry if this has already come up, but I couldn't find it.
Your Environment
The text was updated successfully, but these errors were encountered: