@tanstack/router-core 0.0.1-beta.23 → 0.0.1-beta.24

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.23",
4
+ "version": "0.0.1-beta.24",
5
5
  "license": "MIT",
6
6
  "repository": "tanstack/router",
7
7
  "homepage": "https://tanstack.com/router",
package/src/link.ts CHANGED
@@ -142,8 +142,9 @@ type SearchParamOptions<
142
142
  TTo,
143
143
  TFromSchema = RouteInfoByPath<TAllRouteInfo, TFrom>['fullSearchSchema'],
144
144
  TToSchema = RouteInfoByPath<TAllRouteInfo, TTo>['fullSearchSchema'],
145
- > = StartsWith<TFrom, TTo> extends true // If the next route search extend or cover the from route, params will be optional
146
- ? {
145
+ > = StartsWith<TFrom, TTo> extends true
146
+ ? // If the next route search extend or cover the from route, params will be optional
147
+ {
147
148
  search?: SearchReducer<TFromSchema, TToSchema>
148
149
  }
149
150
  : // Optional search params? Allow it
package/src/route.ts CHANGED
@@ -29,6 +29,7 @@ export interface Route<
29
29
  TAllRouteInfo extends AnyAllRouteInfo = DefaultAllRouteInfo,
30
30
  TRouteInfo extends AnyRouteInfo = RouteInfo,
31
31
  > {
32
+ routeInfo: TRouteInfo
32
33
  routeId: TRouteInfo['id']
33
34
  routeRouteId: TRouteInfo['routeId']
34
35
  routePath: TRouteInfo['path']
@@ -56,7 +57,10 @@ export interface Route<
56
57
  opts?: MatchRouteOptions,
57
58
  ) => RouteInfoByPath<TAllRouteInfo, TResolved>['allParams']
58
59
  navigate: <TTo extends string = '.'>(
59
- options: Omit<LinkOptions<TAllRouteInfo, TRouteInfo['id'], TTo>, 'from'>,
60
+ options: Omit<
61
+ LinkOptions<TAllRouteInfo, TRouteInfo['fullPath'], TTo>,
62
+ 'from'
63
+ >,
60
64
  ) => Promise<void>
61
65
  action: unknown extends TRouteInfo['actionResponse']
62
66
  ?
@@ -185,6 +189,7 @@ export function createRoute<
185
189
  })()
186
190
 
187
191
  let route: Route<TAllRouteInfo, TRouteInfo> = {
192
+ routeInfo: undefined!,
188
193
  routeId: id,
189
194
  routeRouteId: routeId,
190
195
  routePath,