# 'interface' declarations can only be used in typescript files in Vue 3.0 + ts resolvent

2022-04-29 04:27:42

First, check whether there is in the label lang=“ts”

<script lang="ts"></script>


If you don't add lang="ts" try , See if the problem is solved , If not solved , Try the following ：
open setting.json file , find

 "files.associations": {

".eslintrc": "json",
"*.vue": "html"
}


Comment out "*.vue": “html”, as follows ：

 "files.associations": {

".eslintrc": "json",
//"*.vue": "html"
}


The problem can be solved