question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Use Vue component's Props type parameter for prop type validation

See original GitHub issue

Issuehunt badges

  • I have searched through existing issues

Feature Request

To use Vue component Props type parameter for prop type validation feature.

Vue component type has dedicated Props type parameter to represent props:

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 Props type parameter from the component.

It may also solve #2312 and #2343.


IssueHunt Summary

Backers (Total: $100.00)

  • $100.00 have been anonymously funded.

Become a backer now!

Or submit a pull request to get the deposits!

Tips

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

27reactions
SnooHDcommented, Apr 21, 2021

What is the status on this? Would love to see this working 😃

6reactions
issuehunt-app[bot]commented, May 17, 2021

An anonymous user has funded $100.00 to this issue.


Read more comments on GitHub >

github_iconTop Results From Across the Web

Props | Vue.js
Prop Validation #. Components can specify requirements for their props, such as the types you've already seen. If a requirement is not met,...
Read more >
How to Use Props in Vue.js - freeCodeCamp
To specify the type of prop you want to use in Vue, you will use an object instead of an array. You'll use...
Read more >
Vue Prop Type Validation | Pine Wu's Blog - matsu
How Prop Type Validation works · Collect each components' prop information and build interfaces such as __vlsComponentData__child . · For each ...
Read more >
Vue Props Validation - Best Practices - Nordschool
The validator property allows you to create your own custom validator function. They are very handy for example when validating items of an ......
Read more >
Validating Props in Vue - Owen Conti
Use Vue's built-in prop validators to validate your component's props.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found