Skip to content

Commit

Permalink
un-deprecate types for library mode (#12309)
Browse files Browse the repository at this point in the history
  • Loading branch information
pcattori authored Nov 18, 2024
1 parent e9969f1 commit b0e037f
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions packages/react-router/lib/dom/ssr/routeModules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,26 +33,20 @@ export interface RouteModule {

/**
* A function that handles data mutations for a route on the client
*
* @deprecated Use `Route.ClientActionArgs` from generated `+types.<route>`
*/
export type ClientActionFunction = (
args: ClientActionFunctionArgs
) => ReturnType<ActionFunction>;

/**
* Arguments passed to a route `clientAction` function
*
* @deprecated Use `Route.ClientActionArgs` from generated `+types.<route>`
*/
export type ClientActionFunctionArgs = ActionFunctionArgs<undefined> & {
serverAction: <T = unknown>() => Promise<SerializeFrom<T>>;
};

/**
* A function that loads data for a route on the client
*
* @deprecated Use `Route.ClientLoaderArgs` from generated `+types.<route>`
*/
export type ClientLoaderFunction = ((
args: ClientLoaderFunctionArgs
Expand All @@ -62,8 +56,6 @@ export type ClientLoaderFunction = ((

/**
* Arguments passed to a route `clientLoader` function
*
* @deprecated Use `Route.ClientLoaderArgs` from generated `+types.<route>`
*/
export type ClientLoaderFunctionArgs = LoaderFunctionArgs<undefined> & {
serverLoader: <T = unknown>() => Promise<SerializeFrom<T>>;
Expand Down Expand Up @@ -96,8 +88,6 @@ export type LayoutComponent = ComponentType<{
* A function that defines `<link>` tags to be inserted into the `<head>` of
* the document on route transitions.
*
* @deprecated Use `Route.LinksFunction` from generated `+types.<route>`
*
* @see https://remix.run/route/meta
*/
export interface LinksFunction {
Expand All @@ -119,9 +109,6 @@ export interface MetaMatch<
error?: unknown;
}

/**
* @deprecated Use `{ matches }` from `Route.MetaArgs` from generated `+types.<route>`
*/
export type MetaMatches<
MatchLoaders extends Record<
string,
Expand All @@ -136,9 +123,6 @@ export type MetaMatches<
}[keyof MatchLoaders]
>;

/**
* @deprecated Use `Route.MetaArgs` from generated `+types.<route>`
*/
export interface MetaArgs<
Loader extends LoaderFunction | ClientLoaderFunction | unknown = unknown,
MatchLoaders extends Record<
Expand All @@ -163,8 +147,6 @@ export interface MetaArgs<
* routes in the route hierarchy. In other words, they will only be rendered on
* the route in which they are exported.
*
* @deprecated Use `Route.MetaFunction` from generated `+types.<route>`
*
* @param Loader - The type of the current route's loader function
* @param MatchLoaders - Mapping from a parent route's filepath to its loader
* function type
Expand Down

0 comments on commit b0e037f

Please sign in to comment.