@tanstack/router-core 0.0.1-beta.158 → 0.0.1-beta.159

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tanstack/router-core",
3
3
  "author": "Tanner Linsley",
4
- "version": "0.0.1-beta.158",
4
+ "version": "0.0.1-beta.159",
5
5
  "license": "MIT",
6
6
  "repository": "tanstack/router",
7
7
  "homepage": "https://tanstack.com/router",
@@ -43,7 +43,7 @@
43
43
  "tiny-invariant": "^1.3.1",
44
44
  "tiny-warning": "^1.0.3",
45
45
  "@gisatcz/cross-package-react-context": "^0.2.0",
46
- "@tanstack/react-store": "0.0.1-beta.158"
46
+ "@tanstack/react-store": "0.0.1-beta.159"
47
47
  },
48
48
  "scripts": {
49
49
  "build": "rollup --config rollup.config.js",
package/src/router.ts CHANGED
@@ -74,7 +74,7 @@ export type RegisteredRouter = Register extends {
74
74
  router: infer TRouter extends AnyRouter
75
75
  }
76
76
  ? TRouter
77
- : Router
77
+ : AnyRouter
78
78
 
79
79
  export interface LocationState {}
80
80
 
@@ -107,7 +107,7 @@ export type HydrationCtx = {
107
107
  }
108
108
 
109
109
  export interface RouteMatch<
110
- TRouteTree extends AnyRoute = AnyRoute,
110
+ TRouteTree extends AnyRoute = RegisteredRouter['routeTree'],
111
111
  TRoute extends AnyRoute = Route,
112
112
  > {
113
113
  id: string
@@ -182,16 +182,16 @@ export interface RouterOptions<
182
182
  }
183
183
 
184
184
  export interface RouterState<
185
- TRouteTree extends AnyRoute = AnyRoute,
185
+ TRouteTree extends AnyRoute = RegisteredRouter['routeTree'],
186
186
  // TState extends LocationState = LocationState,
187
187
  > {
188
188
  status: 'idle' | 'pending'
189
189
  isFetching: boolean
190
- matchesById: Record<string, RouteMatch<any, any>>
190
+ matchesById: Record<string, RouteMatch<TRouteTree, AnyRoute>>
191
191
  matchIds: string[]
192
192
  pendingMatchIds: string[]
193
- matches: RouteMatch<any, any>[]
194
- pendingMatches: RouteMatch<any, any>[]
193
+ matches: RouteMatch<TRouteTree, AnyRoute>[]
194
+ pendingMatches: RouteMatch<TRouteTree, AnyRoute>[]
195
195
  location: ParsedLocation<FullSearchSchema<TRouteTree>>
196
196
  resolvedLocation: ParsedLocation<FullSearchSchema<TRouteTree>>
197
197
  lastUpdated: number
@@ -250,7 +250,7 @@ export const componentTypes = [
250
250
  ] as const
251
251
 
252
252
  export class Router<
253
- TRouteTree extends AnyRoute = AnyRoute,
253
+ TRouteTree extends AnyRoute = RegisteredRouter['routeTree'],
254
254
  TDehydrated extends Record<string, any> = Record<string, any>,
255
255
  > {
256
256
  types!: {
@@ -1735,7 +1735,7 @@ function isCtrlEvent(e: MouseEvent) {
1735
1735
  export type AnyRedirect = Redirect<any, any, any>
1736
1736
 
1737
1737
  export type Redirect<
1738
- TRouteTree extends AnyRoute = AnyRoute,
1738
+ TRouteTree extends AnyRoute = RegisteredRouter['routeTree'],
1739
1739
  TFrom extends RoutePaths<TRouteTree> = '/',
1740
1740
  TTo extends string = '',
1741
1741
  > = NavigateOptions<TRouteTree, TFrom, TTo> & {
@@ -1743,7 +1743,7 @@ export type Redirect<
1743
1743
  }
1744
1744
 
1745
1745
  export function redirect<
1746
- TRouteTree extends AnyRoute = AnyRoute,
1746
+ TRouteTree extends AnyRoute = RegisteredRouter['routeTree'],
1747
1747
  TFrom extends RoutePaths<TRouteTree> = '/',
1748
1748
  TTo extends string = '',
1749
1749
  >(opts: Redirect<TRouteTree, TFrom, TTo>): Redirect<TRouteTree, TFrom, TTo> {