Veturで"Type annotations can only be used in TypeScript files."が出る場合
557 ワード
TypeScript化したVue.jsプロジェクトに過去のVue.jsプロジェクトからコンポーネントを移植してTS化していた際、VeturがType annotations can only be used in TypeScript files.
とエラーを出して型定義をさせてくれませんでした。
原因
凡ミス中の凡ミスですが、原因は<script>
タグに<script lang="ts">
と記載していないことでした。
参考
Couldn't resolve 'types' can only be used in a .ts file. Vetur(8010) #1347
Author And Source
この問題について(Veturで"Type annotations can only be used in TypeScript files."が出る場合), 我々は、より多くの情報をここで見つけました https://qiita.com/aki4003/items/8d3006f6d104aae5350e著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .