@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/build/cjs/packages/router-core/src/routeConfig.js.map +1 -1
- package/build/cjs/packages/router-core/src/routeMatch.js.map +1 -1
- package/build/cjs/packages/router-core/src/router.js.map +1 -1
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/stats-react.json +126 -126
- package/build/types/index.d.ts +5 -5
- package/build/umd/index.development.js.map +1 -1
- package/build/umd/index.production.js.map +1 -1
- package/package.json +1 -1
- package/src/routeConfig.ts +2 -13
- package/src/routeMatch.ts +2 -2
- package/src/router.ts +1 -1
package/build/types/index.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ type GetFrameworkGeneric<U> = U extends keyof FrameworkGenerics ? FrameworkGener
|
|
|
19
19
|
interface RouteMatch<TAllRouteInfo extends AnyAllRouteInfo = DefaultAllRouteInfo, TRouteInfo extends AnyRouteInfo = RouteInfo> extends Route<TAllRouteInfo, TRouteInfo> {
|
|
20
20
|
matchId: string;
|
|
21
21
|
pathname: string;
|
|
22
|
-
params: TRouteInfo['
|
|
22
|
+
params: TRouteInfo['allParams'];
|
|
23
23
|
parentMatch?: RouteMatch;
|
|
24
24
|
childMatches: RouteMatch[];
|
|
25
25
|
routeSearch: TRouteInfo['searchSchema'];
|
|
@@ -197,7 +197,7 @@ interface Loader<TFullSearchSchema extends AnySearchSchema = {}, TAllParams exte
|
|
|
197
197
|
}
|
|
198
198
|
interface LoaderState<TFullSearchSchema extends AnySearchSchema = {}, TAllParams extends AnyPathParams = {}> {
|
|
199
199
|
loadedAt: number;
|
|
200
|
-
loaderContext: LoaderContext<
|
|
200
|
+
loaderContext: LoaderContext<TFullSearchSchema, TAllParams>;
|
|
201
201
|
}
|
|
202
202
|
interface RouterState {
|
|
203
203
|
status: 'idle' | 'loading';
|
|
@@ -421,8 +421,8 @@ type DefinedPathParamWarning = 'Path params cannot be redefined by child routes!
|
|
|
421
421
|
type ParentParams<TParentParams> = AnyPathParams extends TParentParams ? {} : {
|
|
422
422
|
[Key in keyof TParentParams]?: DefinedPathParamWarning;
|
|
423
423
|
};
|
|
424
|
-
type LoaderFn<
|
|
425
|
-
interface LoaderContext<
|
|
424
|
+
type LoaderFn<TRouteLoaderData extends AnyLoaderData = {}, TFullSearchSchema extends AnySearchSchema = {}, TAllParams extends AnyPathParams = {}> = (loaderContext: LoaderContext<TFullSearchSchema, TAllParams>) => Promise<TRouteLoaderData>;
|
|
425
|
+
interface LoaderContext<TFullSearchSchema extends AnySearchSchema = {}, TAllParams extends AnyPathParams = {}> {
|
|
426
426
|
params: TAllParams;
|
|
427
427
|
search: TFullSearchSchema;
|
|
428
428
|
signal?: AbortSignal;
|
|
@@ -441,7 +441,7 @@ type RouteOptions<TRouteId extends string = string, TPath extends string = strin
|
|
|
441
441
|
component?: GetFrameworkGeneric<'Component'>;
|
|
442
442
|
errorComponent?: GetFrameworkGeneric<'Component'>;
|
|
443
443
|
pendingComponent?: GetFrameworkGeneric<'Component'>;
|
|
444
|
-
loader?: LoaderFn<
|
|
444
|
+
loader?: LoaderFn<TRouteLoaderData, TFullSearchSchema, TAllParams>;
|
|
445
445
|
loaderMaxAge?: number;
|
|
446
446
|
loaderGcMaxAge?: number;
|
|
447
447
|
action?: ActionFn<TActionPayload, TActionResponse>;
|