TypeScript Version: 2.6.2
It is impossible to exclude or override d.ts files that are located in root of npm module.
For instance I have dependency on module named mymodule.
It contains declaration file in ./node_modules/mymodule/index.d.ts which is poorly made.
I have custom written declaration for it in ./@types/mymodule/index.d.ts
There're defined typeRoots in compilerOptions in ./tsconfig.json
{
"compilerOptions: {
"typeRoots": [
"node_modules/@types",
"@types"
]
}
}
Than I added next rows (options above remained):
{
"compilerOptions: {
"typeRoots": [
"!node_modules/mymodule",
"!node_modules"
]
},
"exclude": {
"node_modules/mymodule/index.d.ts"
}
}
Expected behavior:
mymodule/index.d.ts getting ignored by compiler
Actual behavior:
mymodule/index.d.ts overrides my custom definitions
TypeScript Version: 2.6.2
It is impossible to exclude or override d.ts files that are located in root of npm module.
For instance I have dependency on module named mymodule.
It contains declaration file in ./node_modules/mymodule/index.d.ts which is poorly made.
I have custom written declaration for it in ./@types/mymodule/index.d.ts
There're defined typeRoots in compilerOptions in ./tsconfig.json
Than I added next rows (options above remained):
Expected behavior:
mymodule/index.d.ts getting ignored by compiler
Actual behavior:
mymodule/index.d.ts overrides my custom definitions