Description
🔎 Search Terms
many permutations of the following keywords:
vscode, intellisense, auto, import, typescript, typescript language server, tsconfig, node_modules
Also explicitly scanned the FAQ for "import".
🕗 Version & Regression Information
- This is an issue with VSCode's intellisense not suggesting the correct imports
- This changed between versions 4.1.5 (works) and 4.2.1-rc (broken). There's only one version between (4.3.0-dev.20210211) and it's also broken.
This changed in commit or PR _______no idea how to test thisThis is the behavior in every version I tried, and I reviewed the FAQ for entries about _________I was unable to test this on prior versions because _______
⏯ Playground Link
https://codesandbox.io/s/demo-fail-imports-kwrxd6?file=/main.ts
💻 Code
The broken behavior can be demonstrated with the codesandbox link. However, the correct behavior can only be demonstrated by cloning this repository:
https://github.com/ciriousjoker/demo_fail_imports
The code is the same, but codesandbox.io doesn't support switching between typescript versions and other solutions like stackblitz don't support auto imports at all. Again, remember to restart the TS server between Typescript version switches.
🙁 Actual behavior
Import isn't suggested.
🙂 Expected behavior
Import should be suggested.
Additional information about the issue
- Removing any single of the dependencies "fixes" the issue, but that's not a feasable solution (
npm install
isn't even necessary, just altering thepackage.json
triggers an "update" in this regard) - Given that this worked with previous Typescript versions, it seems like this is a Typescript bug, not a bug with the dependencies
- Dependencies shouldn't break suggestions if npm install worked successfully (in my opinion)
I'm aware that typescript has some magic sauce to determine when to load type definitions, ie the "you have to import it once for Typescript to find it". However, I believe that with this minimal reproducible sample repo this (in my opinion) bug might be fixed.