@tanstack/router-core 0.0.1-beta.19 → 0.0.1-beta.21

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.19",
4
+ "version": "0.0.1-beta.21",
5
5
  "license": "MIT",
6
6
  "repository": "tanstack/router",
7
7
  "homepage": "https://tanstack.com/router",
@@ -50,20 +50,14 @@ export type ParentParams<TParentParams> = AnyPathParams extends TParentParams
50
50
  }
51
51
 
52
52
  export type LoaderFn<
53
- TParentRouteLoaderData extends AnyLoaderData = {},
54
53
  TRouteLoaderData extends AnyLoaderData = {},
55
54
  TFullSearchSchema extends AnySearchSchema = {},
56
55
  TAllParams extends AnyPathParams = {},
57
56
  > = (
58
- loaderContext: LoaderContext<
59
- TParentRouteLoaderData,
60
- TFullSearchSchema,
61
- TAllParams
62
- >,
57
+ loaderContext: LoaderContext<TFullSearchSchema, TAllParams>,
63
58
  ) => Promise<TRouteLoaderData>
64
59
 
65
60
  export interface LoaderContext<
66
- TParentRouteLoaderData extends AnyLoaderData = {},
67
61
  TFullSearchSchema extends AnySearchSchema = {},
68
62
  TAllParams extends AnyPathParams = {},
69
63
  > {
@@ -123,12 +117,7 @@ export type RouteOptions<
123
117
  // If supported by your framework, the content to be rendered as the fallback content until the route is ready to render
124
118
  pendingComponent?: GetFrameworkGeneric<'Component'> //, NoInfer<TParentLoaderData>>
125
119
  // An asynchronous function responsible for preparing or fetching data for the route before it is rendered
126
- loader?: LoaderFn<
127
- TParentRouteLoaderData,
128
- TRouteLoaderData,
129
- TFullSearchSchema,
130
- TAllParams
131
- >
120
+ loader?: LoaderFn<TRouteLoaderData, TFullSearchSchema, TAllParams>
132
121
  // The max age to consider loader data fresh (not-stale) for this route in milliseconds from the time of fetch
133
122
  // Defaults to 0. Only stale loader data is refetched.
134
123
  loaderMaxAge?: number
package/src/routeMatch.ts CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  RouteInfo,
8
8
  } from './routeInfo'
9
9
  import { Router } from './router'
10
- import { replaceEqualDeep, warning } from './utils'
10
+ import { replaceEqualDeep } from './utils'
11
11
 
12
12
  export interface RouteMatch<
13
13
  TAllRouteInfo extends AnyAllRouteInfo = DefaultAllRouteInfo,
@@ -15,7 +15,7 @@ export interface RouteMatch<
15
15
  > extends Route<TAllRouteInfo, TRouteInfo> {
16
16
  matchId: string
17
17
  pathname: string
18
- params: TRouteInfo['params']
18
+ params: TRouteInfo['allParams']
19
19
  parentMatch?: RouteMatch
20
20
  childMatches: RouteMatch[]
21
21
  routeSearch: TRouteInfo['searchSchema']
package/src/router.ts CHANGED
@@ -169,7 +169,7 @@ export interface LoaderState<
169
169
  TAllParams extends AnyPathParams = {},
170
170
  > {
171
171
  loadedAt: number
172
- loaderContext: LoaderContext<AnyLoaderData, TFullSearchSchema, TAllParams>
172
+ loaderContext: LoaderContext<TFullSearchSchema, TAllParams>
173
173
  }
174
174
 
175
175
  export interface RouterState {