Closed
Description
TypeScript Version: Version 3.8.0-dev.20191206
Search Terms: overwrite .d.ts declaration
Steps to reproduce
The repo is a minimal working example and contains practically no code.
git clone https://github.com/sguillia/ts-bug-repro
cd ts-bug-repro
tsc -p . # Ignore error about missing .d.ts
tsc -p .
Expected behavior:
Compiles without error, by ignoring the dist
folder as specified in the tsconfig.json
.
Actual behavior:
The second tsc
run spits out an error.
error TS5055: Cannot write file '/home/user/ts-bug-repro/dist/main.d.ts' because it would overwrite input file.
Found 1 error.
Related Issues:
Not a valid duplicate because it is old, misses version information and misses easy-to-reproduce steps
#16749
Look for error TS5055
. The FAQ mentions this error but takes the assumption that we have allowJs
which is untrue in my case.
https://github.com/Microsoft/TypeScript/wiki/FAQ#common-bugs-that-arent-bugs