File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
packages/router/src/experimental Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -90,6 +90,12 @@ import {
90
90
*/
91
91
export type _OnReadyCallback = [ ( ) => void , ( reason ?: any ) => void ]
92
92
93
+ // NOTE: we could override each type with the new matched array but this would
94
+ // interface RouteLocationResolved<Name extends keyof RouteMap = keyof RouteMap>
95
+ // extends Omit<_RouteLocationResolved<Name>, 'matched'> {
96
+ // matched: EXPERIMENTAL_RouteRecordNormalized[]
97
+ // }
98
+
93
99
/**
94
100
* Options to initialize a {@link Router} instance.
95
101
*/
@@ -548,8 +554,10 @@ export function experimental_createRouter(
548
554
// }
549
555
550
556
const matchedRoute = matcher . resolve (
557
+ // FIXME: should be ok
558
+ // @ts -expect-error: too many overlads
551
559
rawLocation ,
552
- currentLocation satisfies NEW_LocationResolved < EXPERIMENTAL_RouteRecordNormalized >
560
+ currentLocation
553
561
)
554
562
const href = routerHistory . createHref ( matchedRoute . fullPath )
555
563
@@ -564,8 +572,8 @@ export function experimental_createRouter(
564
572
}
565
573
}
566
574
567
- // TODO: can this be refactored at the very end
568
575
// matchedRoute is always a new object
576
+ // @ts -expect-error: the `matched` property is different
569
577
return assign ( matchedRoute , {
570
578
redirectedFrom : undefined ,
571
579
href,
You can’t perform that action at this time.
0 commit comments