TS5055

Cannot write file because it would overwrite input file. Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files.

Broken Code ❌

tsc mycode.js --allowJs

Fixed Code ✔️

tsc mycode.js --allowJs --outDir dist

Alternatively, you can also skip compiling code (if you just want to check the types of your code):

tsc mycode.js --allowJs --noEmit