Global type not recognized in files excluded from compilation
I have global type defined in global.d.ts
type Id = string;
It gets recognized in files included for tsc build.
However it's not recognized by WebStorm IDE (TS2304: Cannot find name 'Id'.) in files excluded from tsc compilation, e.g. test files running with ts-node (without any issues btw.).
Please sign in to leave a comment.
Running tsc in terminal gives the same error, and the other editors (VSCode) show it as well:
Solved with dedicated tsconfig.json placed in test directory:
{"extends": "../tsconfig.json",
"compilerOptions": {
"noEmit": true
},
"files": [
"../global.d.ts"
],
"include": [
"**/*.ts"
],
"exclude": []
}