-
-
Notifications
You must be signed in to change notification settings - Fork 496
Open
Labels
good reproduction ✨This issue provides a good reproduction, we will be able to investigate it firstThis issue provides a good reproduction, we will be able to investigate it first🔨 p3-minor-bug
Description
Vue - Official extension or vue-tsc version
3.1.2
VSCode version
Vue version
3.5.13
TypeScript version
5.9.3
System Info
package.json dependencies
Steps to reproduce
- Create Vue component with error at the same node as
v-elseand try to suppress the error with@vue-ignore:
<template>
<div v-if="condition"></div>
<!-- @vue-ignore -->
<div v-else :class="unknownProp"> Test </div>
</template>
<script setup lang="ts">
import { shallowRef } from 'vue';
const condition = shallowRef(false);
</script>- Run
vue-tsc(e.g../node_modules/.bin/vue-tsc --noEmit)
What is expected?
Error should be suppressed
What is actually happening?
Error is reported as if there were not @vue-ignore directive:
frontend/components/TestComponent.vue:6:13 - error TS2339: Property 'unknownProp' does not exist on type '{ condition: boolean; $: ComponentInternalInstance; $data: {}; $props: {}; $attrs: Data; $refs: Data; $slots: Readonly<InternalSlots>; ... 19 more ...; $router: Router; }'.
6 :class="unknownProp"
~~~~~~~~~~~
Found 1 error in frontend/components/TestComponent.vue:6
Workaround: use v-if="!condition" instead of v-else
Link to minimal reproduction
No response
Any additional comments?
No response
Mathious6
Metadata
Metadata
Assignees
Labels
good reproduction ✨This issue provides a good reproduction, we will be able to investigate it firstThis issue provides a good reproduction, we will be able to investigate it first🔨 p3-minor-bug