Skip to content

feat: accept route name argument getRouteBaseName#3446

Merged
BobbieGoede merged 3 commits intonuxt-modules:mainfrom
BobbieGoede:feat/get-route-base-name-string-2
Mar 22, 2025
Merged

feat: accept route name argument getRouteBaseName#3446
BobbieGoede merged 3 commits intonuxt-modules:mainfrom
BobbieGoede:feat/get-route-base-name-string-2

Conversation

@BobbieGoede
Copy link
Copy Markdown
Member

@BobbieGoede BobbieGoede commented Mar 22, 2025

🔗 Linked issue

❓ Type of change

  • 📖 Documentation (updates to the documentation, readme or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

Resolves #3401

This changes the function getRouteBaseName (returned by useRouteBaseName) to also accept directly passing a route name rather than a full route object. These type for this will narrow if typedPages is enabled, so incorrect usage will cause type checking to fail.

📝 Checklist

  • I have linked an issue or discussion.
  • I have added tests (if possible).
  • I have updated the documentation accordingly.

@BobbieGoede BobbieGoede self-assigned this Mar 22, 2025
@BobbieGoede BobbieGoede merged commit 3ca5e38 into nuxt-modules:main Mar 22, 2025
9 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.

getRouteBaseName should accept route.name as string

1 participant