Encountering an Issue: I am facing errors when performing type checking on my application using tsc
, particularly with modules connected via npm link
.
Below is the command I use for type-checking:
"type-check": "tsc --noEmit -p tsconfig.json"
and here is a snippet of my tsconfig.json
:
{
"compilerOptions": {
"outDir": "./dist/",
"sourceMap": true,
"noImplicitAny": false,
"allowJs": true,
"module": "commonjs",
"target": "es6",
"jsx": "react",
"esModuleInterop": true,
"experimentalDecorators": true,
"skipLibCheck": true
//"importsNotUsedAsValues": "error"
},
"exclude": ["./node_modules/*"] // Various attempts made like node_modules, /node_modules, and node_modules/
}
The issue arises due to typing errors in one of my node_modules linked through npm.
Is there any solution to exclude this particular module from the type check?
Update:
I have also experimented with utilizing a double globstar (**
) as shown below:
"exclude": ["./node_modules/**/*"]
However, this approach yields the same incorrect outcome.