In my VueJs App everything works as expected. Only thing annoying me is a typescript error in my template block. Is there any option similar to what I would do in my script block?
<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>
You can use <!-- @vue-ignore --> #3215. For example:
<template>
<!-- @vue-ignore -->
<HelloWorld :msg="wrongType" />
<!-- @vue-expect-error Describe your error here -->
<HelloWorld :msg="wrongType" />
<!-- @vue-skip -->
<SomethingYouDontWantVolarToRecognizeIt>
...
</SomethingYouDontWantVolarToRecognizeIt>
</template>
I found my solution finally. //@ts-ignore is still the solution for my problem but most importantly an Enter afterwards makes its magic happen.
If a typescript error annoys you in a v-if="",v-model="",v-for="" etc. in your template block, you can ignore it like this:
Typescript error throwing line of code:
<div v-if="value.input_type === 'text'">
Typescript error ignoring lines of code:
<div v-if="//@ts-ignore
value.input_type === 'text'">
If a typescript error annoys you in a mustache i.e. double curly braces in your template block do this:
Typescript error throwing line of code:
<h3>{{value.label }}</h3>
Typescript error ignoring lines of code:
<h3>{{//@ts-ignore
value.label }}</h3>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With