Invalid prop: type check failed for prop "userId". Expected Object, got String with value "100".
at <MyCompuser-id="100">
at <Repl>
I'm aware TypeScript does not actually have nominal types and this is just a hack to fake it but I think this is a common enough usage in large codebases that it should be accounted for
Vue version
3.5.15
Link to minimal reproduction
https://play.vuejs.org/#eNqlkl1v0zAUhv/KkS8ISMXd1E1IIa1E0SSGBEyscIMRypLTkuHYlu2UVlH+O8d2m04T7IY7+3y85zkfPXtjDN92yHJWuMo2xoMs1WYumHeCgUPfmYVQTWu09dDDF4f2uoYB1la3kPHp0paqzl6PIR/2b3VrRnf6hgqZUEJVWjkPXRKZQ3Z+dpZB6Q6yQhXTBEEl6eOxNbL0GH6+SFLhKXweJF42NXEmMcGCY0qRxfRBGptQH1R03Wz4vdOK2uyFAhCsIq1Gov1kfENQguUQPcFXSql/v482bzucHO3VT6x+/cV+73bBJtiNRaLZomCjz5d2gz65r24/4o7eo7PVdScp+gnnZ3RadoExhS07VRP2g7hIex2n36jNyl3tPCp3bCqAhsghxgtGmwhj/FfrJ9wZv4h5Qg00xdMe//NSTldgrDaOjqDGdaPwJvyKA0faaT6exbB4/uLJ43iHNATo++NpDYT9+BBife4dNZAA7oKBAG737Z2WoYJQuIv4fm8QYkKxmsByQVEreHYck8Wy1kru4VuU+J7Dkhgfpx8GMD/oOG9pPRPIkj1LUD+2aMOuCGrGL/n5RbB593W0XvJXfMaGP6MxOio=
Steps to reproduce
For some reason, the sfc playground always throws the error unless you're in
MyComp.vue's JS tabSwitching between 3.5.14 and 3.5.15 show the type of
userIdprop change fromnulltoObjectWhat is expected?
No type errors
What is actually happening?
The nominal type is treated as
Objectinstead of a string primitiveSystem Info
Any additional comments?
I'm aware TypeScript does not actually have nominal types and this is just a hack to fake it but I think this is a common enough usage in large codebases that it should be accounted for