How to "extend" component props & emit types when Fallthrough Attributes? #9906
-
How can I create component A to wrap component B, extend all props & emit types from component B to component A and make intellisense works fine and able to build ? I tried to do something like this:
reproduction: Vue SFC Playground but I get a error |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Related
Vue supports complex types for defineProps but not entire prop object you have to add it one by one https://github.com/joe-bell/cva/blob/main/examples/latest/vue/src/components/Button.vue#L27C3-L30C8 |
Beta Was this translation helpful? Give feedback.
Related
https://vuejs.org/guide/typescript/composition-api.html#syntax-limitations
#9774
https://github.com/vuejs/language-tools/tree/master/packages/component-type-helpers (TypeScript error in Vue defineProps macro if you use entire extracted types object)
#9556 replacement of
component-type-helpers
(TypeScript error in Vue defineProps macro if you use entire extracted types object)https://twitter.com/sadeghbarati5/status/1737941738675929366?t=PD10-g9KQRyX9Cq9gasNdg&s=19
Vue supports complex types for defineProps but not entire prop object you have to add it one by one
https://github.com/joe-bell/cva/blob/main/examples/latest/vue/src/components/Button.vue#L27C3-L30C8
https:…