【发布时间】:2022-11-18 22:28:03
【问题描述】:
是的,我是 VueJs 和 Typescript 的新手,但请不要告诉我这是多么糟糕的做法,因为 typescript 提供这行代码 //@ignore-ts 是有原因的。现在在我的 VueJs 应用程序中,一切都按预期工作。唯一让我恼火的是我的代码编辑器中模板块中的打字稿错误。是否有任何我找不到的选项类似于我在脚本块中所做的?
<script setup lang="ts">
//@ignore-ts
this line will be ignored of typescript errors
</script>
<template>
<!-- @ignore-ts -->
this does not work and this line still has a typescript error
</template>
here 提出了一个更全面的问题来解决我的问题
【问题讨论】:
标签: typescript vue.js