**cannot write file because it would overwrite input file**


### js & ts in same workspace
```type{  "compilerOptions": {    // Tells TypeScript to read `.js` files, as normally they are    // ignored as source files.    "allowJs": true,    // Generate `d.ts` files.    "declaration": true,    // This compiler run should only output `d.ts` files.    "emitDeclarationOnly": true,    // Types should go into this directory. Removing this would place    // the `.d.ts` files next to the `.js` files.    "outDir": "dist"  }}```


> [TypeScript: cannot write file .d.ts because it would overwrite input file](https://www.codejam.info/2021/10/typescript-cannot-write-file-overwrite-input.html)





