As I work on improving my JavaScript quality with TypeScript in VSCode, I’m encountering an issue with my tsconfig.json file. It keeps throwing errors when trying to write my .js files, specifically displaying the message:
"Cannot write file 'lib/chart.js' because it would overwrite input file."
While I have come across similar questions that suggest excluding .js files, I actually want TypeScript to provide code warnings for those files. I am seeking advice on how to configure TypeScript to review my JS files without encountering errors related to writing the input file itself.
It’s important to note that this issue is not universal for all my .js files, but rather specific ones. Below, I have included a snippet of my tsconfig.json file:
{
"compilerOptions": {
"allowJs": true,
"checkJs": true,
"lib": ["es2018", "dom"]
},
"include": [
"lib"
],
"typeAcquisition": {
"enable": true
}
}