Feature request. Types. Props type in DefineComponent type.
What problem does this feature solve?
Makes it possible to proxy props from one component to another.
What does the proposed API look like?
<ChildComponent v-bind="childProps" >
...
props: {
...ChildComponent.props
},
setup(props) {
const childProps = componentPropsValues(ChildComponent, props)
return { childProps }
}
@posva, This already works, true, but there is an issue with types. For some reason, there are not props types in the ComponentOptionsBase type.
I created code sandbox: https://codesandbox.io/s/eloquent-golick-996nz?file=/src/App.vue
If I add any props from the child component, then parent component props will have such type { [key: string]: any }
I made a function that extracts prop types, but it is not working with props without a default value.
I got this issue in the code sandbox and the local environment too.