My project structure was created using angular-cli
, which includes a root tsconfig.json
, src/tsconfig.app.json
, and src/tsconfig.spec.json
. Despite having the noImplicitAny
and strict
options enabled in the root configuration, I do not receive error notifications in my editor when I fail to specify function argument types or assign a variable typed as number
to null
.
Is there a way to set up WebStorm to utilize my root tsconfig.json
for providing suggestions?
Below is an excerpt from my root tsconfig.json
:
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"module": "es2015",
"moduleResolution": "node",
"target": "esnext",
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2017",
"dom",
"esnext"
],
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"strict": true,
"strictNullChecks": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitAny": true,
"noImplicitThis": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true
}
}
Details of my TypeScript settings in WebStorm:
https://i.sstatic.net/2bqFQ.png
Even after specifying the "files"
and "include"
options in tsconfig.json
to point to my *.ts
files, I still do not see any errors. When running tsc
in my project directory, I do receive the expected error messages, but the editor does not provide any hints.