You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to custom props for every components. But In vue/jsx-runtime IntrinsicAttributes only extends ReservedProps.
The ReservedProps is a type, not a interface. So i can't use declare module to extend custom props.
// jsx.d.tsdeclare module 'vue'{interfaceHTMLAttributes{vPermission?: stringvLoading?: boolean}// How can i customize the props of every components?interfaceReservedProps{vPermission?: stringvLoading?: boolean}}export{}
How about add ComponentCustomProps to extends IntrinsicAttributes .
importtype{ComponentCustomProps}from'@vue/runtime-dom'declare global {namespaceJSX{// ...exportinterfaceIntrinsicAttributesextendsComponentCustomProps{}}}
Vue version
vue3.5.10
Link to minimal reproduction
https://stackblitz.com/github/zhiyuanzmj/vue-jsx-reproduction?file=src%2FApp.tsx
Steps to reproduce
I want to custom props for every components. But In vue/jsx-runtime IntrinsicAttributes only extends ReservedProps.
The ReservedProps is a type, not a interface. So i can't use declare module to extend custom props.
Just like react:
What is expected?
How about add ComponentCustomProps to extends IntrinsicAttributes .
What is actually happening?
I can't find any way to custom props.
System Info
Any additional comments?
No response
The text was updated successfully, but these errors were encountered: