Skip to content

Conversation

@Anoesj
Copy link
Contributor

@Anoesj Anoesj commented Aug 8, 2025

Summary by CodeRabbit

  • Documentation
    • Expanded and clarified TypeScript guidance, detailing exported route-related types and example augmentations.
    • Improved instructions for manually typing dynamically added routes, including an example public route-info shape.
    • Added a new section on enabling and using the sfc-typed-router Volar plugin for automatic route typings in page components.
    • Corrected config references and noted Volar plugin integration limitations and manual enablement steps.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 8, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Documentation 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 nuxt.config.ts filename and added a note on manual Volar plugin enablement.

Changes

Cohort / File(s) Change Summary
TypeScript Usage Documentation
docs/guide/typescript.md
Expanded TypeScript docs to describe exported types (RouteNamedMap, internal _... types), added a declare module 'vue-router/auto-routes' augmentation example exposing a public _RouteFileInfoMap, clarified route-type narrowing (includes child-route typings), and added sfc-typed-router Volar plugin configuration and notes.
Nuxt Getting Started Docs
docs/nuxt/getting-started.md
Fixed nuxt.config.jsnuxt.config.ts in instructions, added note that the sfc-typed-router Volar plugin must be enabled manually (link to manual enablement).

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e5c1100 and f5329aa.

📒 Files selected for processing (1)
  • docs/guide/typescript.md (3 hunks)

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link

codecov bot commented Aug 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.75%. Comparing base (2d20014) to head (f5329aa).
⚠️ Report is 122 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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 snippet

Snippet imports ./typed-router.d, while the file generated earlier is typed-router.d.ts. Append the .ts extension to avoid “file not found” issues in strict TS setups.


56-60: Small wording tweak for clarity

Consider 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

📥 Commits

Reviewing files that changed from the base of the PR and between 2d20014 and e5c1100.

📒 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 types

The added explanation of RouteNamedMap, _RouteFileInfoMap, and _RouteNamesForFilePath makes the generated file much easier to reason about. No further action needed.


95-108: Example paths look good

The augmentation example is correct and mirrors real catch-all route syntax. 👍


143-171: Nuxt/Volar setup instructions are spot-on

The config snippets are accurate and match current Nuxt expectations. Nice work.

docs/nuxt/getting-started.md (2)

3-11: Filename correction acknowledged

Switch to nuxt.config.ts is correct and prevents confusion in TS projects.


13-13: Verify anchor link

Double-check the URL /guide/typescript#using-the-sfc-typed-router-volar-plugin renders correctly on the deployed docs site (some generators strip the leading slash).

@posva posva merged commit d7527e7 into posva:main Oct 14, 2025
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants