Les annotations de type ne peuvent être utilisées que dans les fichiers TypeScript.

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

"javascript.validate.enable": false
Lokesh003