Skip to content

Commit

Permalink
Merge pull request #11720 from remix-run/pedro/define-route-app-load-…
Browse files Browse the repository at this point in the history
…context

defineRoute: use AppLoadContext
  • Loading branch information
pcattori committed Jun 24, 2024
2 parents 7ac021a + 731251f commit b54a81c
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions packages/react-router/lib/router/define-route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@ import type {
MetaMatch as _MetaMatch,
} from "../dom/ssr/routeModules";
import type { LinkDescriptor } from "../dom/ssr/links";
import type { AppLoadContext } from "../server-runtime/data";
import type { Location } from "./history";
import type { UIMatch } from "./utils";

// TODO: replace `Context` with `AppLoadContext` once `react-router` absorbs `server-runtime` (https://github.com/remix-run/react-router/pull/11669)
interface Context {}

type MaybePromise<T> = T | Promise<T>;
type Pretty<T> = { [K in keyof T]: T[K] } & {};

Expand Down Expand Up @@ -43,15 +41,15 @@ export type ResponseStub = {

// loader
type LoaderArgs<Param extends string> = {
context: Context;
context: AppLoadContext;
request: Request;
params: Params<Param>;
response: ResponseStub;
};

// action
type ActionArgs<Param extends string> = {
context: Context;
context: AppLoadContext;
request: Request;
params: Params<Param>;
response: ResponseStub;
Expand Down

0 comments on commit b54a81c

Please sign in to comment.