@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.
@@ -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['params'];
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<AnyLoaderData, TFullSearchSchema, TAllParams>;
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<TParentRouteLoaderData extends AnyLoaderData = {}, TRouteLoaderData extends AnyLoaderData = {}, TFullSearchSchema extends AnySearchSchema = {}, TAllParams extends AnyPathParams = {}> = (loaderContext: LoaderContext<TParentRouteLoaderData, TFullSearchSchema, TAllParams>) => Promise<TRouteLoaderData>;
425
- interface LoaderContext<TParentRouteLoaderData extends AnyLoaderData = {}, TFullSearchSchema extends AnySearchSchema = {}, TAllParams extends AnyPathParams = {}> {
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<TParentRouteLoaderData, TRouteLoaderData, TFullSearchSchema, TAllParams>;
444
+ loader?: LoaderFn<TRouteLoaderData, TFullSearchSchema, TAllParams>;
445
445
  loaderMaxAge?: number;
446
446
  loaderGcMaxAge?: number;
447
447
  action?: ActionFn<TActionPayload, TActionResponse>;