vue3+ts 出现 import type declarations can only be used in TypeScript files/Type assertion expressions can only ...
vs code的设置中false:
"typescript.validate.enable": false, "javascript.validate.enable": false, "vetur.validation.script": false, "vetur.validation.template": false, "diffEditor.ignoreTrimWhitespace": false, "css.validate": false, "less.validate": false, "scss.validate": false, "vetur.validation.style": false
发现还是有波浪线,虽然不影响编译,但是还是有warning
找到这一段,将其注掉,就OK了。这个是之前手工加入了,所以去掉。
参考:https://blog.csdn.net/weixin_43342105/article/details/110225400
道法自然