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

Intellisense works only with TypeScript v5, while in documentation it's just recommendation to use v5 #215

Open
ddubrava opened this issue Sep 14, 2023 · 2 comments

Comments

@ddubrava
Copy link

Documentation issue

The current i18next TypeScript documentation mentions that TypeScript version 5 is recommended to be used. In practice, intellisense does not work at all in TypeScript version 4. So developers must use TypeScript version 5 if they use the code from the documentation.

https://www.i18next.com/overview/typescript

Screenshot 2023-09-14 at 21 42 21

To reproduce it, you can use this example and downgrade TypeScript to v4.

Screenshot 2023-09-14 at 21 47 24

In my case, the problem was that I had not noticed the 'Intellisense not working' section in troubleshooting and was trying to use the examples from the documentation using v4.

Motivation

To provide accurate guidance and improve the developer experience, it is crucial to update the documentation and clearly state that intellisense support is only available starting from TypeScript version 5.

The documentation should highlight that all examples and solutions related to TypeScript and i18next are applicable and relevant only to TypeScript version 5 onwards.

This clarification will help developers avoid spending unnecessary time trying to set up Intellisense support for i18next with TypeScript version 4, and ensure that they are aware of the minimum TypeScript version requirement.

@adrai
Copy link
Member

adrai commented Sep 14, 2023

The TypeScript checks works also with v4. Not all developers use a code editor with intellisense...
But yes, feel free to suggest a PR with changes to address this.
btw: @pedrodurek is there any way the intellisense could work again with v4?

@ddubrava
Copy link
Author

ddubrava commented Sep 14, 2023

The TypeScript checks works also with v4. Not all developers use a code editor with intellisense... But yes, feel free to suggest a PR with changes to address this. btw: @pedrodurek is there any way the intellisense could work again with v4?

Well, I don't know. I spent a few hours trying to figure out why everything works in your project while in ours it doesn't. And we also have npm workspaces, so I thought the problem might be related to them. Then, somehow, I thought about updating TypeScript and it helped. And, unfortunately, I didn't notice the recommendation about using v5 in the documentation 🤷

p.s. just to clarify: I do not mean VS Code IntelliSense, but rather autocomplete in general, such as in WebStorm

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

No branches or pull requests

2 participants