Last 12 weeks · 0 commits
5 of 6 standards met
[x] I have searched through existing issues Feature Request To use Vue component type parameter for prop type validation feature. Vue component type has dedicated type parameter to represent props: Vue 2: 5th parameter of https://github.com/vuejs/vue/blob/dev/types/vue.d.ts#L64 Vue 3: 1st, 7th and 8th parameters of https://github.com/vuejs/vue-next/blob/master/packages/runtime-core/src/componentPublicInstance.ts#L163 By using it, we can validate any kind of component if it is properly typed. An example use case is Vue Class Component. I'm planning to introduce a new way to define component props and it will be quite a different API interface from the basic Vue's prop definition. We can even use prop type validation with class component if we use type parameter from the component. It may also solve #2312 and #2343. IssueHunt Summary Backers (Total: $100.00) $100.00 have been anonymously funded. Submitted pull Requests #3732 Use component props type for prop validation #3733 Fix prop validation for typed component props Become a backer now! Or submit a pull request to get the deposits! Tips Checkout the Issuehunt explorer to discover more funded issues. Need some help from other developers? Add your repositories on IssueHunt to raise funds.
Fixes #2344. Summary Preserve imported child components' exported TypeScript type while analyzing component info. Extract props from and component types, then merge them with existing runtime metadata. Add Vue 2 and Vue 3 diagnostics coverage for generic props type parameters. Tests IssueHunt Summary Referenced issues This pull request has been submitted to: #2344: Use Vue component's Props type parameter for prop type validation
This lets prop validation fall back to the component instance type when Vetur cannot find props from the usual options/decorator paths. That covers components whose props are only represented in the component type, while keeping the existing extraction path first so normal , array props, and decorators keep their current behavior. I also skip types with a string index signature so broad -style props do not wipe out the existing fallback. Checked: I also tried , but it requires downloading VS Code 1.53.2 and the download was too slow to finish locally. Closes #2344 IssueHunt Summary Referenced issues This pull request has been submitted to: #2344: Use Vue component's Props type parameter for prop type validation
Repository: vuejs/vetur. Description: Vue tooling for VS Code. Stars: 5750, Forks: 596. Primary language: TypeScript. Languages: TypeScript (92.7%), Vue (6.2%), JavaScript (1%), Shell (0%). License: MIT. Homepage: https://vuejs.github.io/vetur/ Topics: hacktoberfest, visual-studio-code, vscode, vue, vue-tooling. Latest release: v0.37.3 (3y ago). Open PRs: 29, open issues: 329. Last activity: 2y ago. Community health: 75%. Top contributors: octref, yoyo930021, dependabot[bot], HerringtonDarkholme, dependabot-preview[bot], ktsn, p-kuen, jasonlyu123, sapphi-red, jacob-greenfield and others.