Description
Vue version
3.5.13
Link to minimal reproduction
Steps to reproduce
- Run the playground
- Check the console
- The
onUpdateDate
method is called twice, the first time with aDate
the second time withundefined
. The typescript types don’t reflect this behaviour
What is expected?
The types should indicate that the event payload can be Date | undefined
What is actually happening?
The event payload is typed as Date
System Info
Any additional comments?
Types as they show up in my IDE (VS Code):
const modelDate: ModelRef<Date | undefined, string, Date | undefined, Date | undefined>
(property) "onUpdate:date"?: ((date: Date) => any) | undefined
Please note that the SFC Playground (at least for me) doese not show the types correctly for some reason