Skip to content

Commit 257bc0f

Browse files
committed
chore: fix build
1 parent 944dc4a commit 257bc0f

File tree

8 files changed

+41
-33
lines changed

8 files changed

+41
-33
lines changed

packages/react-router/src/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ export type {
123123
ValidatorObj,
124124
FileRoutesByPath,
125125
RouteById,
126+
RootRouteOptions,
126127
} from '@tanstack/router-core'
127128

128129
export {
@@ -271,7 +272,6 @@ export type {
271272
RouteComponent,
272273
ErrorRouteComponent,
273274
NotFoundRouteComponent,
274-
RootRouteOptions,
275275
} from './route'
276276

277277
export {

packages/react-router/tests/route.test-d.tsx

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,20 @@ import {
77
redirect,
88
} from '../src'
99
import type {
10-
AnyRouter,
1110
BuildLocationFn,
1211
ControlledPromise,
1312
NavigateFn,
1413
NavigateOptions,
15-
ParsedLocation,
16-
Route,
1714
SearchSchemaInput,
1815
} from '../src'
1916
import type {
17+
AnyRoute,
18+
AnyRouter,
19+
Expand,
2020
MakeRouteMatchFromRoute,
2121
MakeRouteMatchUnion,
22-
} from '../src/Matches'
22+
ParsedLocation,
23+
} from '@tanstack/router-core'
2324

2425
test('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
})

packages/react-router/tests/useMatch.test-d.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { describe, expectTypeOf, test } from 'vitest'
22
import { createRootRoute, createRoute, createRouter, useMatch } from '../src'
3-
import type { MakeRouteMatch, MakeRouteMatchUnion } from '../src/Matches'
3+
import type { MakeRouteMatch, MakeRouteMatchUnion } from '@tanstack/router-core'
44

55
const rootRoute = createRootRoute()
66

packages/router-core/src/route.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,13 @@ import type { RootRouteId } from './root'
1010
import type { ParseRoute } from './routeInfo'
1111
import type { AnyRouter, RegisteredRouter } from './router'
1212
import type { BuildLocationFn, NavigateFn } from './RouterProvider'
13-
import type { Assign, Constrain, Expand, IntersectAssign } from './utils'
13+
import type {
14+
Assign,
15+
Constrain,
16+
Expand,
17+
IntersectAssign,
18+
NoInfer,
19+
} from './utils'
1420
import type {
1521
AnySchema,
1622
AnyStandardSchemaValidator,

packages/solid-router/tests/Matches.test-d.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
useMatchRoute,
99
useMatches,
1010
} from '../src'
11-
import type { AnyRouteMatch, RouteMatch } from '../src'
11+
import type { AnyRouteMatch, RouteMatch } from '@tanstack/router-core'
1212
import type * as Solid from 'solid-js'
1313

1414
const rootRoute = createRootRoute()

packages/solid-router/tests/route.test-d.tsx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,19 @@ import {
88
} from '../src'
99
import type { Accessor } from 'solid-js'
1010
import type {
11-
AnyRouter,
1211
BuildLocationFn,
1312
ControlledPromise,
1413
NavigateFn,
1514
NavigateOptions,
1615
ParsedLocation,
17-
Route,
1816
SearchSchemaInput,
1917
} from '../src'
2018
import type {
19+
AnyRoute,
20+
AnyRouter,
2121
MakeRouteMatchFromRoute,
2222
MakeRouteMatchUnion,
23-
} from '../src/Matches'
23+
} from '@tanstack/router-core'
2424

2525
test('when creating the root', () => {
2626
const rootRoute = createRootRoute()
@@ -89,7 +89,7 @@ test('when creating the root with a loader', () => {
8989
navigate: (opts: NavigateOptions<AnyRouter>) => Promise<void> | void
9090
parentMatchPromise: never
9191
cause: 'preload' | 'enter' | 'stay'
92-
route: Route
92+
route: AnyRoute
9393
}>()
9494
},
9595
})
@@ -197,7 +197,7 @@ test('when creating the root route with context and a loader', () => {
197197
navigate: (opts: NavigateOptions<AnyRouter>) => Promise<void> | void
198198
parentMatchPromise: never
199199
cause: 'preload' | 'enter' | 'stay'
200-
route: Route
200+
route: AnyRoute
201201
}>()
202202
},
203203
})
@@ -272,7 +272,7 @@ test('when creating the root route with context, routeContext, beforeLoad and a
272272
navigate: (opts: NavigateOptions<AnyRouter>) => Promise<void> | void
273273
parentMatchPromise: never
274274
cause: 'preload' | 'enter' | 'stay'
275-
route: Route
275+
route: AnyRoute
276276
}>()
277277
},
278278
})
@@ -414,7 +414,7 @@ test('when creating a child route with a loader from the root route', () => {
414414
navigate: (opts: NavigateOptions<AnyRouter>) => Promise<void> | void
415415
parentMatchPromise: Promise<MakeRouteMatchFromRoute<typeof rootRoute>>
416416
cause: 'preload' | 'enter' | 'stay'
417-
route: Route
417+
route: AnyRoute
418418
}>()
419419
return [{ id: 'invoice1' }, { id: 'invoice2' }] as const
420420
},
@@ -460,7 +460,7 @@ test('when creating a child route with a loader from the root route with context
460460
navigate: (opts: NavigateOptions<AnyRouter>) => Promise<void> | void
461461
parentMatchPromise: Promise<MakeRouteMatchFromRoute<typeof rootRoute>>
462462
cause: 'preload' | 'enter' | 'stay'
463-
route: Route
463+
route: AnyRoute
464464
}>()
465465
return [{ id: 'invoice1' }, { id: 'invoice2' }] as const
466466
},
@@ -654,7 +654,7 @@ test('when creating a child route with params, search and loader from the root r
654654
navigate: (opts: NavigateOptions<AnyRouter>) => Promise<void> | void
655655
parentMatchPromise: Promise<MakeRouteMatchFromRoute<typeof rootRoute>>
656656
cause: 'preload' | 'enter' | 'stay'
657-
route: Route
657+
route: AnyRoute
658658
}>
659659
},
660660
})
@@ -679,7 +679,7 @@ test('when creating a child route with params, search, loader and loaderDeps fro
679679
navigate: (opts: NavigateOptions<AnyRouter>) => Promise<void> | void
680680
parentMatchPromise: Promise<MakeRouteMatchFromRoute<typeof rootRoute>>
681681
cause: 'preload' | 'enter' | 'stay'
682-
route: Route
682+
route: AnyRoute
683683
}>(),
684684
})
685685
})
@@ -703,7 +703,7 @@ test('when creating a child route with params, search, loader and loaderDeps fro
703703
navigate: (opts: NavigateOptions<AnyRouter>) => Promise<void> | void
704704
parentMatchPromise: Promise<MakeRouteMatchFromRoute<typeof rootRoute>>
705705
cause: 'preload' | 'enter' | 'stay'
706-
route: Route
706+
route: AnyRoute
707707
}>(),
708708
})
709709
})
@@ -806,7 +806,7 @@ test('when creating a child route with params, search with routeContext, beforeL
806806
navigate: (opts: NavigateOptions<AnyRouter>) => Promise<void> | void
807807
parentMatchPromise: Promise<MakeRouteMatchFromRoute<typeof rootRoute>>
808808
cause: 'preload' | 'enter' | 'stay'
809-
route: Route
809+
route: AnyRoute
810810
}>()
811811
},
812812
})
@@ -1167,7 +1167,7 @@ test('when creating a child route with routeContext, beforeLoad, search, params,
11671167
MakeRouteMatchFromRoute<typeof detailsRoute>
11681168
>
11691169
cause: 'preload' | 'enter' | 'stay'
1170-
route: Route
1170+
route: AnyRoute
11711171
}>(),
11721172
})
11731173
})

packages/solid-router/tests/routeApi.test-d.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { describe, expectTypeOf, test } from 'vitest'
22
import { createRootRoute, createRoute, createRouter, getRouteApi } from '../src'
33
import type { Accessor } from 'solid-js'
4-
import type { MakeRouteMatch, UseNavigateResult } from '../src'
4+
import type { MakeRouteMatch, UseNavigateResult } from '@tanstack/router-core'
55

66
const rootRoute = createRootRoute()
77

packages/solid-router/tests/useMatch.test-d.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { describe, expectTypeOf, test } from 'vitest'
22
import { createRootRoute, createRoute, createRouter, useMatch } from '../src'
3-
import type { MakeRouteMatch, MakeRouteMatchUnion } from '../src/Matches'
3+
import type { MakeRouteMatch, MakeRouteMatchUnion } from '@tanstack/router-core'
44
import type * as Solid from 'solid-js'
55

66
const rootRoute = createRootRoute()

0 commit comments

Comments
 (0)