Component properties auto-complete fails for react project in IntelliJ Idea Ultimate. Follow
Answered
In react project, component properties are not shown in auto suggestion while in VS Code it shows.
Also notice the error shown in VS Code is just below (line 9) marking red color but in IntelliJ it showing at line 22.
Please sign in to leave a comment.
Hi Rohit - can you share a demo project where this can be reproduced?
Arina Efremova As I can't upload zip file here but it is easy to reproduce.
Installing
react-select
typings (usingnpm install @types/react-select
, or via the intention available onAlt+Enter
- see https://www.jetbrains.com/help/idea/configuring-javascript-libraries.html#ws_jsconfigure_libraries_ts_definition_files) should help:This is exactly what VSCode does behind the scene to enhance the completion
Elena Pogorelova Thanks for answering. I tried and yes it is working. Now I want to know is there any settings that will auto download of @types for all libraries in package.json automatically so that I need not to do it manually every time just like VS Code?
Actually this feature is there, but it's enabled by a subset of known widely used libraries only: if a package is specified in the package.json dependencies list AND listed in
typescript.external.type.definitions.packages
. key in Registry (Help > Find Action..., enterregistry...
to locate it), then the typings are downloaded automatically in backgroundElena Pogorelova Ok, but it defeats the purpose, every time I add new library, I had to add in that registry. Is there any value that can be set to that registry so that it enables to download any library from package.json and need not to explicitly mention anywhere.
No, there are no such settings