Skip to content

Commit 1f717fb

Browse files
committed
chore: remove last ts errors
1 parent 49ee966 commit 1f717fb

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

packages/router/src/experimental/router.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,12 @@ import {
9090
*/
9191
export 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,

0 commit comments

Comments
 (0)