Skip to content

Commit 3674f18

Browse files
authored
fix: fix initialEntries type in createMemoryRouter (#9498)
1 parent 096edeb commit 3674f18

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.changeset/odd-kids-buy.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"react-router": patch
3+
---
4+
5+
fix initialEntries type in createMemoryRouter

packages/react-router/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import type {
1717
Router as RemixRouter,
1818
ShouldRevalidateFunction,
1919
To,
20+
InitialEntry,
2021
} from "@remix-run/router";
2122
import {
2223
AbortedDeferredError,
@@ -203,7 +204,7 @@ export function createMemoryRouter(
203204
opts?: {
204205
basename?: string;
205206
hydrationData?: HydrationState;
206-
initialEntries?: string[];
207+
initialEntries?: InitialEntry[];
207208
initialIndex?: number;
208209
}
209210
): RemixRouter {

0 commit comments

Comments
 (0)