Type inference failure in defineProps when using generic type aliases for function props #13240
Labels
🔨 p3-minor-bug
Priority 3: this fixes a bug, but is an edge case that only affects very specific usage.
scope: compiler
scope: sfc
Vue version
3.5.13
Link to minimal reproduction
https://play.vuejs.org/#eNqdU8tu2zAQ/BWCl9hAareSTqqsoI8UaA910PbIiyyvHKYUSZCU48DQv3dJRrGMWDn0InB2ZpdDcnSkn7Re7DugOS0ctFpUDkomCSm2fB8WuPyiWk2WZyhv5IcVo/hl1IMkgCSCNIA0giyADEGcUCzj5GI52g+hrQ3XjlhwnSaikjvsc5ZRZHmrlXEkbNwY1ZKrxdIDb/zqI5O1ktYR9EJWZDYnq5I0lbAwYpJJJp1ksldMsYwm0RK9RnOobPhu8WCVxPs7+tMxWqMxLsCsteM4idGcBMZzlRDq8UeoOdPB9VCv76H+e6H+YA++xuidAQtmD4y+cK4yO3CRvv39Ew64fiFbte0Eqt8gf4FVovMeo+xzJ7doe6QLbr+Hu+dy98feHhxIOxzKG/XKPugZxbfwbzJ19JPddJGFPiZ7vMXhHS8GkFj3JACD0GI3l+82yjnV5iR5r/FihkD6PB2P4f37fojXOZNMMukkk50x/xFb96SBfOukzxHHrpzIrt2ACZnaKCWgkpiqQZYU6/IkXU+ofCqDOM4qkRoiq43SFulH7u6/QlN1wtmZ976Fhku483Tx/CB4WTe5H4T9EScRjwdHIr3J37IfRVnszkKhL2fzkIrTZvnzrzSKN255sZperGavqj548/FfSft/9JKE/g==
Steps to reproduce
When defining props using defineProps with function types that utilize generic type aliases, the compiled prop type incorrectly becomes null instead of Function. This occurs specifically when using:
Generic type aliases (Fun2 in reproduction)
Type aliases referencing generic types (Fun4 in reproduction)
Can see that fn2 and fn4 are null in type
What is expected?
All default function should be Function type
What is actually happening?
fn2 and fn4 both became boolean
System Info
Any additional comments?
No response
The text was updated successfully, but these errors were encountered: