Skip to content

Commit a4c6f93

Browse files
authored
Add back optional response stub for v2 (#9399)
1 parent 6893db5 commit a4c6f93

2 files changed

Lines changed: 5 additions & 7 deletions

File tree

.changeset/fresh-pigs-leave.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

packages/remix-server-runtime/routeModules.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import type {
1111
import type { AppData, AppLoadContext } from "./data";
1212
import type { LinkDescriptor } from "./links";
1313
import type { SerializeFrom } from "./serialize";
14+
import type { ResponseStub } from "./single-fetch";
1415

1516
export interface RouteModules<RouteModule> {
1617
[routeId: string]: RouteModule | undefined;
@@ -40,6 +41,8 @@ export type ActionFunction = (
4041
export type ActionFunctionArgs = RRActionFunctionArgs<AppLoadContext> & {
4142
// Context is always provided in Remix, and typed for module augmentation support.
4243
context: AppLoadContext;
44+
// TODO: (v7) Make this non-optional once single-fetch is the default
45+
response?: ResponseStub;
4346
};
4447

4548
/**
@@ -71,6 +74,8 @@ export type LoaderFunction = (
7174
export type LoaderFunctionArgs = RRLoaderFunctionArgs<AppLoadContext> & {
7275
// Context is always provided in Remix, and typed for module augmentation support.
7376
context: AppLoadContext;
77+
// TODO: (v7) Make this non-optional once single-fetch is the default
78+
response?: ResponseStub;
7479
};
7580

7681
/**

0 commit comments

Comments
 (0)