Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable optional params at type level #285

Open
posva opened this issue Jan 4, 2024 — with Volta.net · 0 comments
Open

Disable optional params at type level #285

posva opened this issue Jan 4, 2024 — with Volta.net · 0 comments
Labels
✨ feature request a new feature request 🔹 typescript issue related to types

Comments

Copy link
Owner

posva commented Jan 4, 2024

In Vue Router, params are reused by name whenever possible. This is why from a typing perspective, doing router.push({ name: 'route-name' }) for a route like { name: 'route-name', path: '/route/:id' } is valid and can work depending on where you are. This feature might disappear in major versions of Vue Router so I want to try out adding a type level restriction that is opt-in here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ feature request a new feature request 🔹 typescript issue related to types
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant