1- // React Router generated types for route:
2- // root.tsx
3-
4- import type * as T from "react-router/route-module"
5-
1+ // Generated by React Router
62
3+ import type { GetInfo , GetAnnotations } from "react-router/internal" ;
74
85type Module = typeof import ( "../root.js" )
96
10- export type Info = {
11- parents : [ ] ,
12- id : "root"
13- file : "root.tsx"
14- path : ""
15- params : { } & { [ key : string ] : string | undefined }
7+ type Info = GetInfo < {
8+ file : "root.tsx" ,
169 module : Module
17- loaderData : T . CreateLoaderData < Module >
18- actionData : T . CreateActionData < Module >
19- }
10+ } >
11+
12+ type Matches = [ {
13+ id : "root" ;
14+ module : typeof import ( "../root.js" ) ;
15+ } ] ;
16+
17+ type Annotations = GetAnnotations < Info & { module : Module , matches : Matches } , false > ;
2018
2119export namespace Route {
22- export type LinkDescriptors = T . LinkDescriptors
23- export type LinksFunction = ( ) => LinkDescriptors
20+ // links
21+ export type LinkDescriptors = Annotations [ "LinkDescriptors" ] ;
22+ export type LinksFunction = Annotations [ "LinksFunction" ] ;
23+
24+ // meta
25+ export type MetaArgs = Annotations [ "MetaArgs" ] ;
26+ export type MetaDescriptors = Annotations [ "MetaDescriptors" ] ;
27+ export type MetaFunction = Annotations [ "MetaFunction" ] ;
28+
29+ // headers
30+ export type HeadersArgs = Annotations [ "HeadersArgs" ] ;
31+ export type HeadersFunction = Annotations [ "HeadersFunction" ] ;
32+
33+ // middleware
34+ export type MiddlewareFunction = Annotations [ "MiddlewareFunction" ] ;
35+
36+ // clientMiddleware
37+ export type ClientMiddlewareFunction = Annotations [ "ClientMiddlewareFunction" ] ;
38+
39+ // loader
40+ export type LoaderArgs = Annotations [ "LoaderArgs" ] ;
41+
42+ // clientLoader
43+ export type ClientLoaderArgs = Annotations [ "ClientLoaderArgs" ] ;
44+
45+ // action
46+ export type ActionArgs = Annotations [ "ActionArgs" ] ;
2447
25- export type MetaArgs = T . CreateMetaArgs < Info >
26- export type MetaDescriptors = T . MetaDescriptors
27- export type MetaFunction = ( args : MetaArgs ) => MetaDescriptors
48+ // clientAction
49+ export type ClientActionArgs = Annotations [ "ClientActionArgs" ] ;
2850
29- export type HeadersArgs = T . HeadersArgs
30- export type HeadersFunction = ( args : HeadersArgs ) => Headers | HeadersInit
51+ // HydrateFallback
52+ export type HydrateFallbackProps = Annotations [ "HydrateFallbackProps" ] ;
3153
32- export type LoaderArgs = T . CreateServerLoaderArgs < Info >
33- export type ClientLoaderArgs = T . CreateClientLoaderArgs < Info >
34- export type ActionArgs = T . CreateServerActionArgs < Info >
35- export type ClientActionArgs = T . CreateClientActionArgs < Info >
54+ // Component
55+ export type ComponentProps = Annotations [ "ComponentProps" ] ;
3656
37- export type HydrateFallbackProps = T . CreateHydrateFallbackProps < Info >
38- export type ComponentProps = T . CreateComponentProps < Info >
39- export type ErrorBoundaryProps = T . CreateErrorBoundaryProps < Info >
57+ // ErrorBoundary
58+ export type ErrorBoundaryProps = Annotations [ "ErrorBoundaryProps" ] ;
4059}
0 commit comments