TS6504
error TS6504: File ‘
mycode.js
‘ is a JavaScript file. Did you mean to enable the ‘allowJs
‘ option?
Broken Code ❌
1 |
|
Fixed Code ✔️
You have to enable the “allowJS” flag in your “tsconfig.json” file:
1 |
|
Alternatively, you can enable it through the TypeScript Compiler CLI:
1 |
|