New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generic Prop Type is incompatible with defineModel
and Typed Slots
#3179
Comments
Hi @pikax, could you please confirm if it is a vue core issue? The BooleanKey type does not play well with generics. |
For me (not that familiar with Language Tools) this is a bug with Language tools looking at the generated code (after update the dependencies): // 当使用 defineModel 时,在模板中访问 msg 报错
const count = defineModel<number>("count", {
local: true,
default: 999,
});
const __VLS_publicComponent = (await import('vue')).defineComponent({
props: {} as {
"count": import('vue').PropType<number>,
},
props: ({} as __VLS_TypePropsToRuntimeProps<typeof __VLS_props>),
setup() {
return {
};
},
}); props is declared twice instead of merged in. |
Duplicate of #3164 |
Reproduction: https://github.com/artsmp0/vue-generic-type-bug
See
src/components/HelloWorld.vue
andsrc/components/model-with-props-bug.vue
.The text was updated successfully, but these errors were encountered: