DEV Community

Discussion on: JavaScript Import in VSCode IntelliSense

Collapse
 
t7yang profile image
t7yang • Edited

code has no idea about the package inside node_modules, even in TypeScript, so you have to install types for those packages you need types declaration. You can manually install @types/styled-components, then code can provide auto import via its type definition.

img

Collapse
 
matthias profile image
Matthias 🤖

Does that work in JavaScript projects?

Collapse
 
t7yang profile image
t7yang

Yes, my screen capture is a JavaScript project not a TypeScript project.