@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/build/cjs/packages/router-core/src/route.js +1 -0
- package/build/cjs/packages/router-core/src/route.js.map +1 -1
- package/build/esm/index.js +1 -0
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/stats-react.json +128 -128
- package/build/types/index.d.ts +2 -1
- package/build/umd/index.development.js +1 -0
- package/build/umd/index.development.js.map +1 -1
- package/build/umd/index.production.js +1 -1
- package/build/umd/index.production.js.map +1 -1
- package/package.json +1 -1
- package/src/link.ts +3 -2
- package/src/route.ts +6 -1
package/package.json
CHANGED
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
|
|
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<
|
|
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,
|