Vue - Official extension or vue-tsc version
3.2.8 (checked from 3.2.2)
VSCode version
1.118.1
Vue version
3.5.22
TypeScript version
5.9.3 (also is a bug on 6.0.3)
Steps to reproduce
I have the following component:
<script setup lang="ts" generic="TGroup extends {}, TGroups extends Record<string, TGroup> = Record<string, TGroup>">
defineProps<{
groups: TGroups;
}>();
</script>
<template>
<div>
<template
v-if="Object.keys(groups).length > 0"
>
<template
v-for="(group, type) of groups"
:key="type"
>
<slot
:group="group"
:type="type"
/>
</template>
</template>
<slot
v-else
name="empty"
/>
</div>
</template>
What is expected?
When hovering over the group variable in the v-for (to inspect its type), it should be TGroup
What is actually happening?
Instead, group is marked as unknown.
Any additional comments?
This is not an issue with v2.2.12 - and one of the things preventing us from upgrading.
Vue - Official extension or vue-tsc version
3.2.8 (checked from 3.2.2)
VSCode version
1.118.1
Vue version
3.5.22
TypeScript version
5.9.3 (also is a bug on 6.0.3)
Steps to reproduce
I have the following component:
What is expected?
When hovering over the
groupvariable in thev-for(to inspect its type), it should beTGroupWhat is actually happening?
Instead,
groupis marked asunknown.Any additional comments?
This is not an issue with v2.2.12 - and one of the things preventing us from upgrading.