vue
vue copied to clipboard
feat(types): only extract default prop types if prop options
Only extract default prop types if prop options, this allows DefineComponent
to be used as a public API for exposing component types with union types
Example cases are arguments external 3rd party components, or internal components. The default props only need to be extracted when using defineComponent
when using DefineComponent
type this is not necessary to do and breaks props that are unions.
What kind of change does this PR introduce? (check at least one)
- [ ] Bugfix
- [x] Feature
- [ ] Code style update
- [ ] Refactor
- [ ] Build-related changes
- [ ] Other, please describe:
Does this PR introduce a breaking change? (check one)
- [ ] Yes
- [x] No