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

feat: support for typescript named routes #872

Merged
merged 26 commits into from
May 9, 2022
Merged

feat: support for typescript named routes #872

merged 26 commits into from
May 9, 2022

Conversation

pikax
Copy link
Member

@pikax pikax commented Apr 8, 2021

WIP to support typescript named routes

image

## Limitations
ExtractNamedRoutes needs all the routes to have children:[] declare if one has children.
All the routes must have name

Close #1160

@pikax
Copy link
Member Author

pikax commented Apr 21, 2021

Should we also get the routes from the router?

image

The issue would be:

  • We only have access to the routes with that specific instance
  • We would need to declare/override the default "RouterOptions"
  • How will it integrate with NamedLocationMap, should we merge both? I see NamedLocationMap to be used as the helper to define routes at runtime.
  • How can we declare the params type?

@sapphi-red
Copy link

https://vue-routider.sapphi.red/

I made a wrapper library which strictly types vue-router before.
I am not sure whether it is worth reading but I hope this helps you.

@netlify
Copy link

netlify bot commented May 3, 2022

Deploy Preview for vue-router canceled.

Name Link
🔨 Latest commit 74b4677
🔍 Latest deploy log https://app.netlify.com/sites/vue-router/deploys/627113a92c4cec000898e3cd

@posva posva changed the base branch from main to v4.1 May 3, 2022 11:36
@posva posva merged commit fb1b375 into vuejs:v4.1 May 9, 2022
@pikax pikax deleted the types/support_for_typed_named_routes branch May 9, 2022 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants