-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Description
TypeScript Version:
"typescript": "3.9.7"
Search Terms:
"Solution Style" tsconfig
VS Code Typescript import intellisense failure
Code
https://github.com/seangwright/ng10-0-3-typescript-issue
Expected behavior:
Using "Solution Style" tsconfig.json in VS Code keeps standard code fixes for imports.
Actual behavior:
Code fixes for imports are completely broken.
The below repository was created with a new Angular 10.0.3 project without any Typescript customizations or VS Code settings.
Playground Link:
https://github.com/seangwright/ng10-0-3-typescript-issue
Steps:
npm i -g @angular/cli@latestng new ng103 --skip-gitcd ng103code .- Open in VS Code (1.47.2)
- Open
src/app/app.module.ts - Remove line 5:
import { AppComponent } from './app.component'; - Try to use
ctrl + .code action / fix to add the import statement forAppComponent- this fails and instead recommends
Add 'const' to unresolved variable
- this fails and instead recommends
- Navigate to
src/app/app.component - Try to use
ctrl + .code action / fix to add the import statement forTestService- this fails and instead shows
No code actions available
- this fails and instead shows
Now checkout branch fix/standard-tsconfig and try the above two steps to reproduce the issue and you will see the issue is gone.
All that is different between master and fix/standard-tsconfig is that master uses a "Solution Style" tsconfig.json and fix/standard-tsconfig uses the normal tsconfig.json.
Related Issues:
Both of these were closed but I'm experiencing the exact same issue:
#39411
microsoft/vscode#101696
This one is open but doesn't include the same visual details/simple reproduction:
#39632
I've tried reproducing this with VS Code 1.47.2 and Angular 10 and Typescript 10.8.3 (which means I'm not using "Solution Style" tsconfig.json and I _cannot reproduce the issue.
This problem seems to be specific to "Solution Style" tsconfig.json.

