Skip to content

Commit d4fa249

Browse files
committed
chore: add name to router to allow adding helpers for legacy router
1 parent e968961 commit d4fa249

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

packages/router/src/navigation-api/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -952,6 +952,7 @@ export function createNavigationApiRouter(
952952
}
953953

954954
const router: Router = {
955+
name: 'navigation-api',
955956
currentRoute,
956957
listening: true,
957958

packages/router/src/router.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ export interface RouterOptions extends PathParserOptions {
192192
* Router instance.
193193
*/
194194
export interface Router {
195+
readonly name: 'legacy' | 'navigation-api'
195196
/**
196197
* @internal
197198
*/
@@ -1264,6 +1265,7 @@ export function createRouter(
12641265
}
12651266

12661267
const router: Router = {
1268+
name: 'legacy',
12671269
currentRoute,
12681270
listening: true,
12691271

0 commit comments

Comments
 (0)