Open alexzhang1030 opened 11 months ago
The compiler doesn't resolve generics declared in <script setup generic="...">
.
Should it be supported in the future, or it be designed thus?
Declaring the prop as TGeneric & boolean
instead of just TGeneric
seems to work for me, without breaking the generic-ness of the prop.
defineProps<{
multiple?: TMultiple & boolean;
>);
Vue version
3.3.4
Link to minimal reproduction
https://play.vuejs.org/#eNp9UVFLwzAQ/itnXjphrsjeSjdQGagwHSr4kpfaXrvMNAlJOgel/91LxmYfZE/hvu+7y/fd9ezOmNm+Q5ax3JVWGA8OfWdAFqpZcOYdZ9CgQitKKteAB4+qcvCltcRCcbbkSrRGWw89WKxhgNrqFhIamnDFVYW1ULix2ri85wqgzWAd3iI7D1HDcnIdxKVWzkPrGliEYZPkEaXU8KmtrK4SkuTp0SX9SoXH1sjCI1UA+fZ22fexeRjylKqICmU6D/ubVlcoKQLxFCklMk9H/WxKWen7WjSzndOKFhLdclbq1giJ9tV4QfY4yyAygSvI3c9zxLztcHrCyy2W3//gO3cIGGcbiw7tHjk7c76wDfojvXp/oUWPSHLfSVJfIN/QadkFj0fZfacqsj3SRbdP8VhCNR9uFW7pTqGC0aAcop4zOuDDheh/duezeeyjM7LhF5jJxRc=
Steps to reproduce
See vue playground, the compiled prop result
What is expected?
the compiled prop
m
should be{ type: Boolean }
What is actually happening?
the compiled prop
m
is{}
System Info
No response
Any additional comments?
No response