Skip to content

Commit 46da882

Browse files
committed
align FutureConfig types
1 parent 25d442d commit 46da882

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

packages/react-router/__tests__/useResolvedPath-test.tsx

+1-4
Original file line numberDiff line numberDiff line change
@@ -368,10 +368,7 @@ describe("useResolvedPath", () => {
368368
// gh-issue #11629
369369
it("'.' resolves to the current path including any splat paths nested in pathless routes", () => {
370370
let { container } = render(
371-
<MemoryRouter
372-
initialEntries={["/foo/bar"]}
373-
future={{ v7_relativeSplatPath: true }}
374-
>
371+
<MemoryRouter initialEntries={["/foo/bar"]}>
375372
<Routes>
376373
<Route path="foo">
377374
<Route>

packages/react-router/lib/components.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type {
2-
FutureConfig as RouterFutureConfig,
2+
FutureConfig,
33
HydrationState,
44
InitialEntry,
55
LazyRouteFunction,
@@ -127,7 +127,7 @@ export function createMemoryRouter(
127127
routes: RouteObject[],
128128
opts?: {
129129
basename?: string;
130-
future?: Partial<RouterFutureConfig>;
130+
future?: Partial<FutureConfig>;
131131
hydrationData?: HydrationState;
132132
initialEntries?: InitialEntry[];
133133
initialIndex?: number;

packages/react-router/lib/dom/lib.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import type {
1212
unstable_DataStrategyFunction,
1313
Fetcher,
1414
FormEncType,
15-
FutureConfig as RouterFutureConfig,
15+
FutureConfig,
1616
GetScrollRestorationKeyFunction,
1717
HashHistory,
1818
History,
@@ -124,7 +124,7 @@ try {
124124

125125
interface DOMRouterOpts {
126126
basename?: string;
127-
future?: Partial<RouterFutureConfig>;
127+
future?: Partial<FutureConfig>;
128128
hydrationData?: HydrationState;
129129
unstable_dataStrategy?: unstable_DataStrategyFunction;
130130
unstable_patchRoutesOnMiss?: unstable_PatchRoutesOnMissFunction;

packages/react-router/lib/dom/server.tsx

+5-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import type {
88
CreateStaticHandlerOptions as RouterCreateStaticHandlerOptions,
99
UNSAFE_RouteManifest as RouteManifest,
1010
RouterState,
11-
FutureConfig as RouterFutureConfig,
11+
FutureConfig,
1212
To,
1313
} from "../router";
1414
import {
@@ -270,7 +270,9 @@ export function createStaticHandler(
270270
export function createStaticRouter(
271271
routes: RouteObject[],
272272
context: StaticHandlerContext,
273-
opts: {} = {}
273+
opts: {
274+
future?: Partial<FutureConfig>;
275+
} = {}
274276
): RemixRouter {
275277
let manifest: RouteManifest = {};
276278
let dataRoutes = convertRoutesToDataRoutes(
@@ -301,6 +303,7 @@ export function createStaticRouter(
301303
get future() {
302304
return {
303305
unstable_skipActionErrorRevalidation: false,
306+
...opts?.future,
304307
};
305308
},
306309
get state() {

0 commit comments

Comments
 (0)