The problem: When type checking my app using tsc
I am getting errors for npm link
ed modules.
Here is my type-check command:
"type-check": "tsc --noEmit -p tsconfig.json"
and here is 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/*"] // I've also tried node_modules, /node_modules, node_modules/
}
The command will fail due to type errors in one of my node_modules which is connected via npm link.
Any way to exclude this module from type check
Edit:
I have also tried using a double globstar (**
) e.g.
"exclude": ["./node_modules/**/*"]
and this gives me the same incorrect result.