-
-
Notifications
You must be signed in to change notification settings - Fork 101
feat: add children route names generic to generated RouteNamedMap
and adjust docs and tests
#602
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
base: main
Are you sure you want to change the base?
feat: add children route names generic to generated RouteNamedMap
and adjust docs and tests
#602
Conversation
commit: |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #602 +/- ##
==========================================
+ Coverage 61.72% 61.80% +0.08%
==========================================
Files 32 32
Lines 3135 3142 +7
Branches 580 583 +3
==========================================
+ Hits 1935 1942 +7
Misses 1194 1194
Partials 6 6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some extra info 😄
WalkthroughThe changes update route type declarations throughout the codebase to include two new generic parameters: Changes
📜 Recent review detailsConfiguration used: CodeRabbit UI ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (12)
🚧 Files skipped from review as they are similar to previous changes (11)
🧰 Additional context used🧬 Code Graph Analysis (1)playground/src/router.ts (2)
🔇 Additional comments (3)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
…nd adjust docs and tests
3696626
to
13706a2
Compare
Description
Note
This PR is intended to be paired with the following
vue-router
PR: vuejs/router#2475.This PR itself contains a temporary
pnpm
patch file that applies the changes in above-mentioned PR to work on this feature and make sure you can run tests and generate docs properly. Before merging, this patch needs to be removed andvue-router
should be updated if thevue-router
PR is merged.This extends generated

RouteRecordInfo
objects inRouteNamedMap
to make sure every route defines the route names of their children routes. NowuseRoute('/parent')
can return the typings of both the parent route and its children routes, as can be seen in the example in the adjusted docs:Summary by CodeRabbit
Documentation
New Features
RouteMeta
) and explicit child route names for better type safety and expressiveness, especially for dynamic and nested routes.Chores
vue-router
dependency versions to^4.5.1
.Tests
Refactor