-
-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Closed
Description
Vue version
^3.5.22
Link to minimal reproduction
Steps to reproduce
- Define props with tsx:
export default defineComponent({
props: {
modelValue: {
type: Boolean,
required: true,
},
},
emits: {
'update:modelValue': (v: boolean) => true,
},
- use the defined modelValue with v-model with tsx
<Component v-model={}/>
What is expected?
To not throw typing errors, since VModel is defined.
What is actually happening?
Type '{ ref: Ref<CreateComponentPublicInstanceWithMixins<...>> | undefined, CreateComponentPublicInstanceWithMixins<...> | undefined }'
is not assignable to type 'IntrinsicAttributes & Partial<{}> & Omit<{
readonly modelValue: boolean;
readonly "onUpdate:modelValue"?: ((v: boolean) => any) | undefined;
readonly onSubmit?: ((code: string) => any) | undefined;
} & VNodeProps & AllowedComponentProps & ComponentCustomProps, DefaultKeys<...>>'.
Property 'modelValue' is missing in type '{ ref: Ref<CreateComponentPublicInstanceWithMixins<...>> | undefined, CreateComponentPublicInstanceWithMixins<...> | undefined }'
but required in type 'Omit<{
readonly modelValue: boolean;
readonly "onUpdate:modelValue"?: ((v: boolean) => any) | undefined;
readonly onSubmit?: ((code: string) => any) | undefined;
} & VNodeProps & AllowedComponentProps & ComponentCustomProps, DefaultKeys<...>>'.
System Info
Any additional comments?
No response
Metadata
Metadata
Assignees
Labels
No labels