-
-
Notifications
You must be signed in to change notification settings - Fork 110
docs: enhance typed-router.d.ts docs and add section for using sfc-typed-router
#687
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
Conversation
|
Caution Review failedThe pull request is closed. WalkthroughDocumentation expanded: TypeScript guide now details exported types (RouteNamedMap, _RouteFileInfoMap), manual augmentation examples, child-route typings, and sfc-typed-router Volar plugin setup. Nuxt guide corrected Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #687 +/- ##
==========================================
+ Coverage 60.90% 64.75% +3.84%
==========================================
Files 36 39 +3
Lines 3379 4301 +922
Branches 618 828 +210
==========================================
+ Hits 2058 2785 +727
- Misses 1314 1508 +194
- Partials 7 8 +1 ☔ 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.
Actionable comments posted: 0
🧹 Nitpick comments (2)
docs/guide/typescript.md (2)
24-26: Extension mismatch in import snippetSnippet imports
./typed-router.d, while the file generated earlier istyped-router.d.ts. Append the.tsextension to avoid “file not found” issues in strict TS setups.
56-60: Small wording tweak for clarityConsider replacing “you should also augment” with “you must also augment” to emphasise the requirement when the Volar plugin is used.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
docs/guide/typescript.md(3 hunks)docs/nuxt/getting-started.md(2 hunks)
🔇 Additional comments (5)
docs/guide/typescript.md (3)
36-50: Great addition—clearly documents generated helper typesThe added explanation of
RouteNamedMap,_RouteFileInfoMap, and_RouteNamesForFilePathmakes the generated file much easier to reason about. No further action needed.
95-108: Example paths look goodThe augmentation example is correct and mirrors real catch-all route syntax. 👍
143-171: Nuxt/Volar setup instructions are spot-onThe config snippets are accurate and match current Nuxt expectations. Nice work.
docs/nuxt/getting-started.md (2)
3-11: Filename correction acknowledgedSwitch to
nuxt.config.tsis correct and prevents confusion in TS projects.
13-13: Verify anchor linkDouble-check the URL
/guide/typescript#using-the-sfc-typed-router-volar-pluginrenders correctly on the deployed docs site (some generators strip the leading slash).
Summary by CodeRabbit