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
Remove line 5: import { AppComponent } from './app.component';
Try to use ctrl + . code action / fix to add the import statement for AppComponent
this fails and instead recommends Add 'const' to unresolved variable
Navigate to src/app/app.component
Try to use ctrl + . code action / fix to add the import statement for TestService
this fails and instead shows No code actions available
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.
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.
The text was updated successfully, but these errors were encountered:
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@latest
ng new ng103 --skip-git
cd ng103
code .
src/app/app.module.ts
import { AppComponent } from './app.component';
ctrl + .
code action / fix to add the import statement forAppComponent
Add 'const' to unresolved variable
src/app/app.component
ctrl + .
code action / fix to add the import statement forTestService
No code actions available
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
andfix/standard-tsconfig
is thatmaster
uses a "Solution Style"tsconfig.json
andfix/standard-tsconfig
uses the normaltsconfig.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
.The text was updated successfully, but these errors were encountered: