-
-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Closed
vuejs/language-tools
#5171Labels
Description
Vue version
3.5.13
Link to minimal reproduction
Steps to reproduce
- Run the playground
- Check the console
- The
onUpdateDatemethod is called twice, the first time with aDatethe 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