Skip to content

feat: add routeKey to getRoute return type#14

Merged
olliethedev merged 2 commits into
mainfrom
feat/route-key
Feb 24, 2026
Merged

feat: add routeKey to getRoute return type#14
olliethedev merged 2 commits into
mainfrom
feat/route-key

Conversation

@olliethedev

@olliethedev olliethedev commented Feb 24, 2026

Copy link
Copy Markdown
Collaborator

Note

Medium Risk
Adds a new public field and runtime lookup to route matching; while behavior is additive, the handler-reference-based key resolution could misbehave if route handlers are reused or wrapped.

Overview
createRouter().getRoute now includes a routeKey identifying which entry in the routes map matched, and its TypeScript return type is updated to preserve narrowing based on that key.

Adds a test suite covering routeKey for static, parameterized, and overlapping routes, and bumps the package version to 1.2.0.

Written by Cursor Bugbot for commit 4abadde. This will update automatically on new commits. Configure here.

@olliethedev olliethedev merged commit 7c401d1 into main Feb 24, 2026
2 checks passed
@olliethedev olliethedev deleted the feat/route-key branch February 24, 2026 18:09
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.

1 participant