@@ -7,19 +7,20 @@ import {
77 redirect ,
88} from '../src'
99import type {
10- AnyRouter ,
1110 BuildLocationFn ,
1211 ControlledPromise ,
1312 NavigateFn ,
1413 NavigateOptions ,
15- ParsedLocation ,
16- Route ,
1714 SearchSchemaInput ,
1815} from '../src'
1916import type {
17+ AnyRoute ,
18+ AnyRouter ,
19+ Expand ,
2020 MakeRouteMatchFromRoute ,
2121 MakeRouteMatchUnion ,
22- } from '../src/Matches'
22+ ParsedLocation ,
23+ } from '@tanstack/router-core'
2324
2425test ( 'when creating the root' , ( ) => {
2526 const rootRoute = createRootRoute ( )
@@ -88,7 +89,7 @@ test('when creating the root with a loader', () => {
8889 navigate : ( opts : NavigateOptions < AnyRouter > ) => Promise < void > | void
8990 parentMatchPromise : never
9091 cause : 'preload' | 'enter' | 'stay'
91- route : Route
92+ route : AnyRoute
9293 } > ( )
9394 } ,
9495 } )
@@ -194,7 +195,7 @@ test('when creating the root route with context and a loader', () => {
194195 navigate : ( opts : NavigateOptions < AnyRouter > ) => Promise < void > | void
195196 parentMatchPromise : never
196197 cause : 'preload' | 'enter' | 'stay'
197- route : Route
198+ route : AnyRoute
198199 } > ( )
199200 } ,
200201 } )
@@ -258,6 +259,7 @@ test('when creating the root route with context, routeContext, beforeLoad and a
258259 return { permission : 'view' as const }
259260 } ,
260261 loader : ( opts ) => {
262+ type hi = Expand < typeof opts >
261263 expectTypeOf ( opts ) . toEqualTypeOf < {
262264 abortController : AbortController
263265 preload : boolean
@@ -268,7 +270,7 @@ test('when creating the root route with context, routeContext, beforeLoad and a
268270 navigate : ( opts : NavigateOptions < AnyRouter > ) => Promise < void > | void
269271 parentMatchPromise : never
270272 cause : 'preload' | 'enter' | 'stay'
271- route : Route
273+ route : AnyRoute
272274 } > ( )
273275 } ,
274276 } )
@@ -408,7 +410,7 @@ test('when creating a child route with a loader from the root route', () => {
408410 navigate : ( opts : NavigateOptions < AnyRouter > ) => Promise < void > | void
409411 parentMatchPromise : Promise < MakeRouteMatchFromRoute < typeof rootRoute > >
410412 cause : 'preload' | 'enter' | 'stay'
411- route : Route
413+ route : AnyRoute
412414 } > ( )
413415 return [ { id : 'invoice1' } , { id : 'invoice2' } ] as const
414416 } ,
@@ -459,7 +461,7 @@ test('when creating a child route with a loader from the root route with context
459461 navigate : ( opts : NavigateOptions < AnyRouter > ) => Promise < void > | void
460462 parentMatchPromise : Promise < MakeRouteMatchFromRoute < typeof rootRoute > >
461463 cause : 'preload' | 'enter' | 'stay'
462- route : Route
464+ route : AnyRoute
463465 } > ( )
464466 return [ { id : 'invoice1' } , { id : 'invoice2' } ] as const
465467 } ,
@@ -679,7 +681,7 @@ test('when creating a child route with params, search and loader from the root r
679681 navigate : ( opts : NavigateOptions < AnyRouter > ) => Promise < void > | void
680682 parentMatchPromise : Promise < MakeRouteMatchFromRoute < typeof rootRoute > >
681683 cause : 'preload' | 'enter' | 'stay'
682- route : Route
684+ route : AnyRoute
683685 } >
684686 } ,
685687 } )
@@ -704,7 +706,7 @@ test('when creating a child route with params, search, loader and loaderDeps fro
704706 navigate : ( opts : NavigateOptions < AnyRouter > ) => Promise < void > | void
705707 parentMatchPromise : Promise < MakeRouteMatchFromRoute < typeof rootRoute > >
706708 cause : 'preload' | 'enter' | 'stay'
707- route : Route
709+ route : AnyRoute
708710 } > ( ) ,
709711 } )
710712} )
@@ -728,7 +730,7 @@ test('when creating a child route with params, search, loader and loaderDeps fro
728730 navigate : ( opts : NavigateOptions < AnyRouter > ) => Promise < void > | void
729731 parentMatchPromise : Promise < MakeRouteMatchFromRoute < typeof rootRoute > >
730732 cause : 'preload' | 'enter' | 'stay'
731- route : Route
733+ route : AnyRoute
732734 } > ( ) ,
733735 } )
734736} )
@@ -831,7 +833,7 @@ test('when creating a child route with params, search with routeContext, beforeL
831833 navigate : ( opts : NavigateOptions < AnyRouter > ) => Promise < void > | void
832834 parentMatchPromise : Promise < MakeRouteMatchFromRoute < typeof rootRoute > >
833835 cause : 'preload' | 'enter' | 'stay'
834- route : Route
836+ route : AnyRoute
835837 } > ( )
836838 } ,
837839 } )
@@ -1200,7 +1202,7 @@ test('when creating a child route with routeContext, beforeLoad, search, params,
12001202 MakeRouteMatchFromRoute < typeof detailsRoute >
12011203 >
12021204 cause : 'preload' | 'enter' | 'stay'
1203- route : Route
1205+ route : AnyRoute
12041206 } > ( ) ,
12051207 } )
12061208} )
0 commit comments