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 {
9090 */
9191export type _OnReadyCallback = [ ( ) => void , ( reason ?: any ) => void ]
9292
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+
9399/**
94100 * Options to initialize a {@link Router} instance.
95101 */
@@ -548,8 +554,10 @@ export function experimental_createRouter(
548554 // }
549555
550556 const matchedRoute = matcher . resolve (
557+ // FIXME: should be ok
558+ // @ts -expect-error: too many overlads
551559 rawLocation ,
552- currentLocation satisfies NEW_LocationResolved < EXPERIMENTAL_RouteRecordNormalized >
560+ currentLocation
553561 )
554562 const href = routerHistory . createHref ( matchedRoute . fullPath )
555563
@@ -564,8 +572,8 @@ export function experimental_createRouter(
564572 }
565573 }
566574
567- // TODO: can this be refactored at the very end
568575 // matchedRoute is always a new object
576+ // @ts -expect-error: the `matched` property is different
569577 return assign ( matchedRoute , {
570578 redirectedFrom : undefined ,
571579 href,
You can’t perform that action at this time.
0 commit comments