You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto complete is one of my favorite features of VS code. But sometimes it doesn't provide what I need.
Steps to Reproduce:
Create a project with create-react-app: npx create-react-app test-auto-complete --typescript
Create a empty file src/test.tsx.
Make sure auto complete works: type isvalid and get following suggestions
Then confirm:
Install a typed package from npm. (I made one - safe-touch
See if auto complete works for the package(type safe and expect suggestion of safeTouch):
Negative :(
There is a difference between the types file of safe-touch and react. Safe-touch's is directly under node_modules while react's is under node_modules/@types/. Then I tried to make a folder under @types for the package, simply cp -r node_modules/safe-touch node_modules/@types.
See if auto complete works now:
It works! 🎉🎉
So it seems that VS code is not able to auto complete types of node_modules/[package] even if the package is correctly typed?
Does this issue occur when all extensions are disabled?: Yes/No
No
The text was updated successfully, but these errors were encountered:
I believe this may be the same issue as #30033. Once you add import safeTouch from "safe-touch"; anywhere in the project, then we start suggesting it as an auto import in all ts/tsx files.
Auto complete is one of my favorite features of VS code. But sometimes it doesn't provide what I need.
Steps to Reproduce:
npx create-react-app test-auto-complete --typescript
src/test.tsx
.isvalid
and get following suggestionsThen confirm:
safe
and expect suggestion ofsafeTouch
):Negative :(
node_modules
while react's is undernode_modules/@types/
. Then I tried to make a folder under@types
for the package, simplycp -r node_modules/safe-touch node_modules/@types
.It works! 🎉🎉
So it seems that VS code is not able to auto complete types of
node_modules/[package]
even if the package is correctly typed?Does this issue occur when all extensions are disabled?: Yes/No
No
The text was updated successfully, but these errors were encountered: