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

Fix current() type in strict mode #809

Merged
merged 1 commit into from
Jan 31, 2025
Merged

Conversation

bakerkretzmar
Copy link
Collaborator

Updates route().current() and route().has() to use the new ValidRouteName type so they only return or accept known route names in strict mode. Technically route().current() should always only return known route names, but I don't think we can actually use the KnownRouteName type because the interface it looks in for route names could be empty if the user hasn't run the command to generate it.

Fixes #808.

@bakerkretzmar bakerkretzmar merged commit 02c56fe into 2.x Jan 31, 2025
22 checks passed
@bakerkretzmar bakerkretzmar deleted the strict-route-name-type-fix branch January 31, 2025 19:20
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.

Typescript error with route().current() RouteName
1 participant