react-router 7.6.0 → 7.6.1-pre.0

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.
Files changed (36) hide show
  1. package/CHANGELOG.md +90 -0
  2. package/dist/development/dom-export.d.mts +1 -2
  3. package/dist/development/dom-export.js +1 -1
  4. package/dist/development/dom-export.mjs +23 -23
  5. package/dist/development/index.d.mts +3740 -260
  6. package/dist/development/index.d.ts +1762 -12
  7. package/dist/development/index.js +16 -7
  8. package/dist/development/index.mjs +11439 -121
  9. package/dist/development/internal-export.d.mts +504 -0
  10. package/dist/development/internal-export.d.ts +504 -0
  11. package/dist/development/{lib/types/route-module.js → internal-export.js} +4 -4
  12. package/dist/development/{lib/types/route-module.mjs → internal-export.mjs} +1 -1
  13. package/dist/production/dom-export.d.mts +1 -2
  14. package/dist/production/dom-export.js +1 -1
  15. package/dist/production/dom-export.mjs +23 -23
  16. package/dist/production/index.d.mts +3740 -260
  17. package/dist/production/index.d.ts +1762 -12
  18. package/dist/production/index.js +16 -7
  19. package/dist/production/index.mjs +11439 -121
  20. package/dist/production/internal-export.d.mts +504 -0
  21. package/dist/production/internal-export.d.ts +504 -0
  22. package/dist/production/{lib/types/route-module.js → internal-export.js} +4 -4
  23. package/dist/production/{lib/types/route-module.mjs → internal-export.mjs} +1 -1
  24. package/package.json +7 -7
  25. package/dist/development/chunk-D4RADZKF.mjs +0 -11556
  26. package/dist/development/lib/types/route-module.d.mts +0 -208
  27. package/dist/development/lib/types/route-module.d.ts +0 -208
  28. package/dist/development/lib-CCSAGgcP.d.mts +0 -1736
  29. package/dist/development/route-data-B9_30zbP.d.ts +0 -1749
  30. package/dist/development/route-data-C6QaL0wu.d.mts +0 -1749
  31. package/dist/production/chunk-CVXGOGHQ.mjs +0 -11556
  32. package/dist/production/lib/types/route-module.d.mts +0 -208
  33. package/dist/production/lib/types/route-module.d.ts +0 -208
  34. package/dist/production/lib-CCSAGgcP.d.mts +0 -1736
  35. package/dist/production/route-data-B9_30zbP.d.ts +0 -1749
  36. package/dist/production/route-data-C6QaL0wu.d.mts +0 -1749
@@ -1,208 +0,0 @@
1
- import { aE as LinkDescriptor, L as Location, aB as MetaDescriptor, aV as ServerDataFrom, aW as ClientDataFrom, aX as Func, aY as unstable_MiddlewareNextFunction, E as Equal, ac as unstable_RouterContextProvider, r as MiddlewareEnabled, s as AppLoadContext, aZ as Pretty } from '../../route-data-C6QaL0wu.mjs';
2
- import 'react';
3
-
4
- type IsDefined<T> = Equal<T, undefined> extends true ? false : true;
5
- type MaybePromise<T> = T | Promise<T>;
6
- type RouteModule = {
7
- meta?: Func;
8
- links?: Func;
9
- headers?: Func;
10
- loader?: Func;
11
- clientLoader?: Func;
12
- action?: Func;
13
- clientAction?: Func;
14
- HydrateFallback?: unknown;
15
- default?: unknown;
16
- ErrorBoundary?: unknown;
17
- [key: string]: unknown;
18
- };
19
- type LinkDescriptors = LinkDescriptor[];
20
- type RouteInfo = {
21
- parents: RouteInfo[];
22
- module: RouteModule;
23
- id: unknown;
24
- file: string;
25
- path: string;
26
- params: unknown;
27
- loaderData: unknown;
28
- actionData: unknown;
29
- };
30
- type MetaMatch<T extends RouteInfo> = Pretty<Pick<T, "id" | "params"> & {
31
- pathname: string;
32
- meta: MetaDescriptor[];
33
- data: T["loaderData"];
34
- handle?: unknown;
35
- error?: unknown;
36
- }>;
37
- type MetaMatches<T extends RouteInfo[]> = T extends [infer F extends RouteInfo, ...infer R extends RouteInfo[]] ? [MetaMatch<F>, ...MetaMatches<R>] : Array<MetaMatch<RouteInfo> | undefined>;
38
- type CreateMetaArgs<T extends RouteInfo> = {
39
- /** This is the current router `Location` object. This is useful for generating tags for routes at specific paths or query parameters. */
40
- location: Location;
41
- /** {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route. */
42
- params: T["params"];
43
- /** The return value for this route's server loader function */
44
- data: T["loaderData"];
45
- /** Thrown errors that trigger error boundaries will be passed to the meta function. This is useful for generating metadata for error pages. */
46
- error?: unknown;
47
- /** An array of the current {@link https://api.reactrouter.com/v7/interfaces/react_router.UIMatch.html route matches}, including parent route matches. */
48
- matches: MetaMatches<[...T["parents"], T]>;
49
- };
50
- type MetaDescriptors = MetaDescriptor[];
51
- type HeadersArgs = {
52
- loaderHeaders: Headers;
53
- parentHeaders: Headers;
54
- actionHeaders: Headers;
55
- errorHeaders: Headers | undefined;
56
- };
57
- type IsHydrate<ClientLoader> = ClientLoader extends {
58
- hydrate: true;
59
- } ? true : ClientLoader extends {
60
- hydrate: false;
61
- } ? false : false;
62
- type CreateLoaderData<T extends RouteModule> = _CreateLoaderData<ServerDataFrom<T["loader"]>, ClientDataFrom<T["clientLoader"]>, IsHydrate<T["clientLoader"]>, T extends {
63
- HydrateFallback: Func;
64
- } ? true : false>;
65
- type _CreateLoaderData<ServerLoaderData, ClientLoaderData, ClientLoaderHydrate extends boolean, HasHydrateFallback> = [
66
- HasHydrateFallback,
67
- ClientLoaderHydrate
68
- ] extends [true, true] ? IsDefined<ClientLoaderData> extends true ? ClientLoaderData : undefined : [
69
- IsDefined<ClientLoaderData>,
70
- IsDefined<ServerLoaderData>
71
- ] extends [true, true] ? ServerLoaderData | ClientLoaderData : IsDefined<ClientLoaderData> extends true ? ClientLoaderData : IsDefined<ServerLoaderData> extends true ? ServerLoaderData : undefined;
72
- type CreateActionData<T extends RouteModule> = _CreateActionData<ServerDataFrom<T["action"]>, ClientDataFrom<T["clientAction"]>>;
73
- type _CreateActionData<ServerActionData, ClientActionData> = Awaited<[
74
- IsDefined<ServerActionData>,
75
- IsDefined<ClientActionData>
76
- ] extends [true, true] ? ServerActionData | ClientActionData : IsDefined<ClientActionData> extends true ? ClientActionData : IsDefined<ServerActionData> extends true ? ServerActionData : undefined>;
77
- type ClientDataFunctionArgs<T extends RouteInfo> = {
78
- /**
79
- * A {@link https://developer.mozilla.org/en-US/docs/Web/API/Request Fetch Request instance} which you can use to read the URL, the method, the "content-type" header, and the request body from the request.
80
- *
81
- * @note Because client data functions are called before a network request is made, the Request object does not include the headers which the browser automatically adds. React Router infers the "content-type" header from the enc-type of the form that performed the submission.
82
- **/
83
- request: Request;
84
- /**
85
- * {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
86
- * @example
87
- * // app/routes.ts
88
- * route("teams/:teamId", "./team.tsx"),
89
- *
90
- * // app/team.tsx
91
- * export function clientLoader({
92
- * params,
93
- * }: Route.ClientLoaderArgs) {
94
- * params.teamId;
95
- * // ^ string
96
- * }
97
- **/
98
- params: T["params"];
99
- /**
100
- * When `future.unstable_middleware` is not enabled, this is undefined.
101
- *
102
- * When `future.unstable_middleware` is enabled, this is an instance of
103
- * `unstable_RouterContextProvider` and can be used to access context values
104
- * from your route middlewares. You may pass in initial context values in your
105
- * `<HydratedRouter unstable_getContext>` prop
106
- */
107
- context: unstable_RouterContextProvider;
108
- };
109
- type ServerDataFunctionArgs<T extends RouteInfo> = {
110
- /** A {@link https://developer.mozilla.org/en-US/docs/Web/API/Request Fetch Request instance} which you can use to read the url, method, headers (such as cookies), and request body from the request. */
111
- request: Request;
112
- /**
113
- * {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
114
- * @example
115
- * // app/routes.ts
116
- * route("teams/:teamId", "./team.tsx"),
117
- *
118
- * // app/team.tsx
119
- * export function loader({
120
- * params,
121
- * }: Route.LoaderArgs) {
122
- * params.teamId;
123
- * // ^ string
124
- * }
125
- **/
126
- params: T["params"];
127
- /**
128
- * Without `future.unstable_middleware` enabled, this is the context passed in
129
- * to your server adapter's `getLoadContext` function. It's a way to bridge the
130
- * gap between the adapter's request/response API with your React Router app.
131
- * It is only applicable if you are using a custom server adapter.
132
- *
133
- * With `future.unstable_middleware` enabled, this is an instance of
134
- * `unstable_RouterContextProvider` and can be used for type-safe access to
135
- * context value set in your route middlewares. If you are using a custom
136
- * server adapter, you may provide an initial set of context values from your
137
- * `getLoadContext` function.
138
- */
139
- context: MiddlewareEnabled extends true ? unstable_RouterContextProvider : AppLoadContext;
140
- };
141
- type CreateServerMiddlewareFunction<T extends RouteInfo> = (args: ServerDataFunctionArgs<T>, next: unstable_MiddlewareNextFunction<Response>) => MaybePromise<Response | void>;
142
- type CreateClientMiddlewareFunction<T extends RouteInfo> = (args: ClientDataFunctionArgs<T>, next: unstable_MiddlewareNextFunction<undefined>) => MaybePromise<void>;
143
- type CreateServerLoaderArgs<T extends RouteInfo> = ServerDataFunctionArgs<T>;
144
- type CreateClientLoaderArgs<T extends RouteInfo> = ClientDataFunctionArgs<T> & {
145
- /** This is an asynchronous function to get the data from the server loader for this route. On client-side navigations, this will make a {@link https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API fetch} call to the React Router server loader. If you opt-into running your clientLoader on hydration, then this function will return the data that was already loaded on the server (via Promise.resolve). */
146
- serverLoader: () => Promise<ServerDataFrom<T["module"]["loader"]>>;
147
- };
148
- type CreateServerActionArgs<T extends RouteInfo> = ServerDataFunctionArgs<T>;
149
- type CreateClientActionArgs<T extends RouteInfo> = ClientDataFunctionArgs<T> & {
150
- /** This is an asynchronous function that makes the {@link https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API fetch} call to the React Router server action for this route. */
151
- serverAction: () => Promise<ServerDataFrom<T["module"]["action"]>>;
152
- };
153
- type CreateHydrateFallbackProps<T extends RouteInfo> = {
154
- params: T["params"];
155
- loaderData?: T["loaderData"];
156
- actionData?: T["actionData"];
157
- };
158
- type Match<T extends RouteInfo> = Pretty<Pick<T, "id" | "params"> & {
159
- pathname: string;
160
- data: T["loaderData"];
161
- handle: unknown;
162
- }>;
163
- type Matches<T extends RouteInfo[]> = T extends [infer F extends RouteInfo, ...infer R extends RouteInfo[]] ? [Match<F>, ...Matches<R>] : Array<Match<RouteInfo> | undefined>;
164
- type CreateComponentProps<T extends RouteInfo> = {
165
- /**
166
- * {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
167
- * @example
168
- * // app/routes.ts
169
- * route("teams/:teamId", "./team.tsx"),
170
- *
171
- * // app/team.tsx
172
- * export default function Component({
173
- * params,
174
- * }: Route.ComponentProps) {
175
- * params.teamId;
176
- * // ^ string
177
- * }
178
- **/
179
- params: T["params"];
180
- /** The data returned from the `loader` or `clientLoader` */
181
- loaderData: T["loaderData"];
182
- /** The data returned from the `action` or `clientAction` following an action submission. */
183
- actionData?: T["actionData"];
184
- /** An array of the current {@link https://api.reactrouter.com/v7/interfaces/react_router.UIMatch.html route matches}, including parent route matches. */
185
- matches: Matches<[...T["parents"], T]>;
186
- };
187
- type CreateErrorBoundaryProps<T extends RouteInfo> = {
188
- /**
189
- * {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
190
- * @example
191
- * // app/routes.ts
192
- * route("teams/:teamId", "./team.tsx"),
193
- *
194
- * // app/team.tsx
195
- * export function ErrorBoundary({
196
- * params,
197
- * }: Route.ErrorBoundaryProps) {
198
- * params.teamId;
199
- * // ^ string
200
- * }
201
- **/
202
- params: T["params"];
203
- error: unknown;
204
- loaderData?: T["loaderData"];
205
- actionData?: T["actionData"];
206
- };
207
-
208
- export type { CreateActionData, CreateClientActionArgs, CreateClientLoaderArgs, CreateClientMiddlewareFunction, CreateComponentProps, CreateErrorBoundaryProps, CreateHydrateFallbackProps, CreateLoaderData, CreateMetaArgs, CreateServerActionArgs, CreateServerLoaderArgs, CreateServerMiddlewareFunction, HeadersArgs, LinkDescriptors, MetaDescriptors };
@@ -1,208 +0,0 @@
1
- import { aH as LinkDescriptor, e as Location, aF as MetaDescriptor, aV as ServerDataFrom, aW as ClientDataFrom, aX as Func, aY as unstable_MiddlewareNextFunction, _ as Equal, u as unstable_RouterContextProvider, M as MiddlewareEnabled, i as AppLoadContext, aZ as Pretty } from '../../route-data-B9_30zbP.js';
2
- import 'react';
3
-
4
- type IsDefined<T> = Equal<T, undefined> extends true ? false : true;
5
- type MaybePromise<T> = T | Promise<T>;
6
- type RouteModule = {
7
- meta?: Func;
8
- links?: Func;
9
- headers?: Func;
10
- loader?: Func;
11
- clientLoader?: Func;
12
- action?: Func;
13
- clientAction?: Func;
14
- HydrateFallback?: unknown;
15
- default?: unknown;
16
- ErrorBoundary?: unknown;
17
- [key: string]: unknown;
18
- };
19
- type LinkDescriptors = LinkDescriptor[];
20
- type RouteInfo = {
21
- parents: RouteInfo[];
22
- module: RouteModule;
23
- id: unknown;
24
- file: string;
25
- path: string;
26
- params: unknown;
27
- loaderData: unknown;
28
- actionData: unknown;
29
- };
30
- type MetaMatch<T extends RouteInfo> = Pretty<Pick<T, "id" | "params"> & {
31
- pathname: string;
32
- meta: MetaDescriptor[];
33
- data: T["loaderData"];
34
- handle?: unknown;
35
- error?: unknown;
36
- }>;
37
- type MetaMatches<T extends RouteInfo[]> = T extends [infer F extends RouteInfo, ...infer R extends RouteInfo[]] ? [MetaMatch<F>, ...MetaMatches<R>] : Array<MetaMatch<RouteInfo> | undefined>;
38
- type CreateMetaArgs<T extends RouteInfo> = {
39
- /** This is the current router `Location` object. This is useful for generating tags for routes at specific paths or query parameters. */
40
- location: Location;
41
- /** {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route. */
42
- params: T["params"];
43
- /** The return value for this route's server loader function */
44
- data: T["loaderData"];
45
- /** Thrown errors that trigger error boundaries will be passed to the meta function. This is useful for generating metadata for error pages. */
46
- error?: unknown;
47
- /** An array of the current {@link https://api.reactrouter.com/v7/interfaces/react_router.UIMatch.html route matches}, including parent route matches. */
48
- matches: MetaMatches<[...T["parents"], T]>;
49
- };
50
- type MetaDescriptors = MetaDescriptor[];
51
- type HeadersArgs = {
52
- loaderHeaders: Headers;
53
- parentHeaders: Headers;
54
- actionHeaders: Headers;
55
- errorHeaders: Headers | undefined;
56
- };
57
- type IsHydrate<ClientLoader> = ClientLoader extends {
58
- hydrate: true;
59
- } ? true : ClientLoader extends {
60
- hydrate: false;
61
- } ? false : false;
62
- type CreateLoaderData<T extends RouteModule> = _CreateLoaderData<ServerDataFrom<T["loader"]>, ClientDataFrom<T["clientLoader"]>, IsHydrate<T["clientLoader"]>, T extends {
63
- HydrateFallback: Func;
64
- } ? true : false>;
65
- type _CreateLoaderData<ServerLoaderData, ClientLoaderData, ClientLoaderHydrate extends boolean, HasHydrateFallback> = [
66
- HasHydrateFallback,
67
- ClientLoaderHydrate
68
- ] extends [true, true] ? IsDefined<ClientLoaderData> extends true ? ClientLoaderData : undefined : [
69
- IsDefined<ClientLoaderData>,
70
- IsDefined<ServerLoaderData>
71
- ] extends [true, true] ? ServerLoaderData | ClientLoaderData : IsDefined<ClientLoaderData> extends true ? ClientLoaderData : IsDefined<ServerLoaderData> extends true ? ServerLoaderData : undefined;
72
- type CreateActionData<T extends RouteModule> = _CreateActionData<ServerDataFrom<T["action"]>, ClientDataFrom<T["clientAction"]>>;
73
- type _CreateActionData<ServerActionData, ClientActionData> = Awaited<[
74
- IsDefined<ServerActionData>,
75
- IsDefined<ClientActionData>
76
- ] extends [true, true] ? ServerActionData | ClientActionData : IsDefined<ClientActionData> extends true ? ClientActionData : IsDefined<ServerActionData> extends true ? ServerActionData : undefined>;
77
- type ClientDataFunctionArgs<T extends RouteInfo> = {
78
- /**
79
- * A {@link https://developer.mozilla.org/en-US/docs/Web/API/Request Fetch Request instance} which you can use to read the URL, the method, the "content-type" header, and the request body from the request.
80
- *
81
- * @note Because client data functions are called before a network request is made, the Request object does not include the headers which the browser automatically adds. React Router infers the "content-type" header from the enc-type of the form that performed the submission.
82
- **/
83
- request: Request;
84
- /**
85
- * {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
86
- * @example
87
- * // app/routes.ts
88
- * route("teams/:teamId", "./team.tsx"),
89
- *
90
- * // app/team.tsx
91
- * export function clientLoader({
92
- * params,
93
- * }: Route.ClientLoaderArgs) {
94
- * params.teamId;
95
- * // ^ string
96
- * }
97
- **/
98
- params: T["params"];
99
- /**
100
- * When `future.unstable_middleware` is not enabled, this is undefined.
101
- *
102
- * When `future.unstable_middleware` is enabled, this is an instance of
103
- * `unstable_RouterContextProvider` and can be used to access context values
104
- * from your route middlewares. You may pass in initial context values in your
105
- * `<HydratedRouter unstable_getContext>` prop
106
- */
107
- context: unstable_RouterContextProvider;
108
- };
109
- type ServerDataFunctionArgs<T extends RouteInfo> = {
110
- /** A {@link https://developer.mozilla.org/en-US/docs/Web/API/Request Fetch Request instance} which you can use to read the url, method, headers (such as cookies), and request body from the request. */
111
- request: Request;
112
- /**
113
- * {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
114
- * @example
115
- * // app/routes.ts
116
- * route("teams/:teamId", "./team.tsx"),
117
- *
118
- * // app/team.tsx
119
- * export function loader({
120
- * params,
121
- * }: Route.LoaderArgs) {
122
- * params.teamId;
123
- * // ^ string
124
- * }
125
- **/
126
- params: T["params"];
127
- /**
128
- * Without `future.unstable_middleware` enabled, this is the context passed in
129
- * to your server adapter's `getLoadContext` function. It's a way to bridge the
130
- * gap between the adapter's request/response API with your React Router app.
131
- * It is only applicable if you are using a custom server adapter.
132
- *
133
- * With `future.unstable_middleware` enabled, this is an instance of
134
- * `unstable_RouterContextProvider` and can be used for type-safe access to
135
- * context value set in your route middlewares. If you are using a custom
136
- * server adapter, you may provide an initial set of context values from your
137
- * `getLoadContext` function.
138
- */
139
- context: MiddlewareEnabled extends true ? unstable_RouterContextProvider : AppLoadContext;
140
- };
141
- type CreateServerMiddlewareFunction<T extends RouteInfo> = (args: ServerDataFunctionArgs<T>, next: unstable_MiddlewareNextFunction<Response>) => MaybePromise<Response | void>;
142
- type CreateClientMiddlewareFunction<T extends RouteInfo> = (args: ClientDataFunctionArgs<T>, next: unstable_MiddlewareNextFunction<undefined>) => MaybePromise<void>;
143
- type CreateServerLoaderArgs<T extends RouteInfo> = ServerDataFunctionArgs<T>;
144
- type CreateClientLoaderArgs<T extends RouteInfo> = ClientDataFunctionArgs<T> & {
145
- /** This is an asynchronous function to get the data from the server loader for this route. On client-side navigations, this will make a {@link https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API fetch} call to the React Router server loader. If you opt-into running your clientLoader on hydration, then this function will return the data that was already loaded on the server (via Promise.resolve). */
146
- serverLoader: () => Promise<ServerDataFrom<T["module"]["loader"]>>;
147
- };
148
- type CreateServerActionArgs<T extends RouteInfo> = ServerDataFunctionArgs<T>;
149
- type CreateClientActionArgs<T extends RouteInfo> = ClientDataFunctionArgs<T> & {
150
- /** This is an asynchronous function that makes the {@link https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API fetch} call to the React Router server action for this route. */
151
- serverAction: () => Promise<ServerDataFrom<T["module"]["action"]>>;
152
- };
153
- type CreateHydrateFallbackProps<T extends RouteInfo> = {
154
- params: T["params"];
155
- loaderData?: T["loaderData"];
156
- actionData?: T["actionData"];
157
- };
158
- type Match<T extends RouteInfo> = Pretty<Pick<T, "id" | "params"> & {
159
- pathname: string;
160
- data: T["loaderData"];
161
- handle: unknown;
162
- }>;
163
- type Matches<T extends RouteInfo[]> = T extends [infer F extends RouteInfo, ...infer R extends RouteInfo[]] ? [Match<F>, ...Matches<R>] : Array<Match<RouteInfo> | undefined>;
164
- type CreateComponentProps<T extends RouteInfo> = {
165
- /**
166
- * {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
167
- * @example
168
- * // app/routes.ts
169
- * route("teams/:teamId", "./team.tsx"),
170
- *
171
- * // app/team.tsx
172
- * export default function Component({
173
- * params,
174
- * }: Route.ComponentProps) {
175
- * params.teamId;
176
- * // ^ string
177
- * }
178
- **/
179
- params: T["params"];
180
- /** The data returned from the `loader` or `clientLoader` */
181
- loaderData: T["loaderData"];
182
- /** The data returned from the `action` or `clientAction` following an action submission. */
183
- actionData?: T["actionData"];
184
- /** An array of the current {@link https://api.reactrouter.com/v7/interfaces/react_router.UIMatch.html route matches}, including parent route matches. */
185
- matches: Matches<[...T["parents"], T]>;
186
- };
187
- type CreateErrorBoundaryProps<T extends RouteInfo> = {
188
- /**
189
- * {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
190
- * @example
191
- * // app/routes.ts
192
- * route("teams/:teamId", "./team.tsx"),
193
- *
194
- * // app/team.tsx
195
- * export function ErrorBoundary({
196
- * params,
197
- * }: Route.ErrorBoundaryProps) {
198
- * params.teamId;
199
- * // ^ string
200
- * }
201
- **/
202
- params: T["params"];
203
- error: unknown;
204
- loaderData?: T["loaderData"];
205
- actionData?: T["actionData"];
206
- };
207
-
208
- export type { CreateActionData, CreateClientActionArgs, CreateClientLoaderArgs, CreateClientMiddlewareFunction, CreateComponentProps, CreateErrorBoundaryProps, CreateHydrateFallbackProps, CreateLoaderData, CreateMetaArgs, CreateServerActionArgs, CreateServerLoaderArgs, CreateServerMiddlewareFunction, HeadersArgs, LinkDescriptors, MetaDescriptors };