Description
TS Template added by @mjbvz
TypeScript Version: 3.7.5
Search Terms
- angular
Using the latest vscode with Typescript 3.7.5, intellisense breaks for anything referencing node_modules
. This is reflected on new projects created with @angular/cli
as well. Tested on an Angular 7 project to see if the version difference between Angular 7 and Angular 9 made a difference.
> code --version
1.42.1
c47d83b293181d9be64f27ff093689e8e7aed054
x64
Steps to Reproduce:
- Type a symbol that can be indexed from
node_modules
(e.g. ReactiveFormsModule from Angular). - Hit
ctrl+space
or whatever is the intellisense hotkey is configured.. No Suggestions
appears.
Switching to the lower workspace Typescript version in my Angular 7 setup I can get the suggestions to show again.
Video reproduction with Typescript version switch:
On a fresh Angular 9 setup:
Does this issue occur when all extensions are disabled?: Yes
Same project in Atom:
EDIT: This appears to be happening in Atom with Typescript 3.7.5 as well now in the Angular 9 setup. Might be specifically a Typescript 3.7.5 issue.
EDIT EDIT: It seems that adding node_modules/@angular
as a typeRoot fixes some issues:
TSCONFIG:
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"downlevelIteration": true,
"experimentalDecorators": true,
"module": "esnext",
"moduleResolution": "node",
"importHelpers": true,
"target": "es2015",
"typeRoots": [
"node_modules/@types",
"node_modules/@angular"
],
"lib": [
"es2018",
"dom"
]
},
"angularCompilerOptions": {
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true
}
}
It seems that adding node_modules/@angular
as a typeRoot fixes some issues: