@tanstack/react-router 0.0.1-beta.223 → 0.0.1-beta.224

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/src/fileRoute.ts CHANGED
@@ -108,7 +108,7 @@ export class FileRoute<
108
108
  TChildren extends RouteConstraints['TChildren'] = unknown,
109
109
  TRouteTree extends RouteConstraints['TRouteTree'] = AnyRoute,
110
110
  >(
111
- options: Omit<
111
+ options?: Omit<
112
112
  RouteOptions<
113
113
  TParentRoute,
114
114
  string,
package/src/route.ts CHANGED
@@ -836,3 +836,25 @@ export type PendingRouteComponent<
836
836
  >
837
837
 
838
838
  export type AnyRouteComponent = RouteComponent<any, any, any, any>
839
+
840
+ export type ComponentPropsFromRoute<TRoute> =
841
+ TRoute extends (() => infer T extends AnyRoute)
842
+ ? ComponentPropsFromRoute<T>
843
+ : TRoute extends Route<
844
+ infer TParentRoute,
845
+ infer TPath,
846
+ infer TFullPath,
847
+ infer TCustomId,
848
+ infer TId,
849
+ infer TSearchSchema,
850
+ infer TFullSearchSchema,
851
+ infer TParams,
852
+ infer TAllParams,
853
+ infer TRouteContext,
854
+ infer TAllContext,
855
+ infer TRouterContext,
856
+ infer TLoaderData,
857
+ infer TChildren
858
+ >
859
+ ? RouteProps<TFullSearchSchema, TAllParams, TAllContext, TLoaderData>
860
+ : {}