I tried using the following in the tsconfig.json file:
...
"declaration": true,
"rootDir": "./src/",
"outDir": "./lib/",
...
The first time I execute tsc, it works fine; but the second time that I execute tsc, I get an error message when I tsccomplain that it cannot write the output because it overwrites the input file.
It seems tscto be trying to include TypeScript declaration files that are written to my lib directory.
source
share