Answers for "type annotations can only be used in typescript files.js(8010)"

1

Type annotations can only be used in TypeScript files.

one solution can be to disable the typescript check. so inside the settings.json
add the below code line

"javascript.validate.enable": false
Posted by: Guest on December-25-2021
0

Type annotations can only be used in TypeScript files.Vetur(8010)

Ensure I had lang="ts" as an attribute in my script tag (as described above)
Posted by: Guest on April-30-2022

Code answers related to "type annotations can only be used in typescript files.js(8010)"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language