Skip to content

Commit 5cb2a1f

Browse files
authored
Fix lazy typings (#10677)
1 parent bbc7715 commit 5cb2a1f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/react-router/lib/context.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import type {
1010
StaticHandlerContext,
1111
To,
1212
TrackedPromise,
13+
LazyRouteFunction,
1314
} from "@remix-run/router";
1415
import type { Action as NavigationType } from "@remix-run/router";
1516

@@ -30,7 +31,7 @@ export interface IndexRouteObject {
3031
errorElement?: React.ReactNode | null;
3132
Component?: React.ComponentType | null;
3233
ErrorBoundary?: React.ComponentType | null;
33-
lazy?: AgnosticIndexRouteObject["lazy"];
34+
lazy?: LazyRouteFunction<RouteObject>;
3435
}
3536

3637
export interface NonIndexRouteObject {
@@ -48,7 +49,7 @@ export interface NonIndexRouteObject {
4849
errorElement?: React.ReactNode | null;
4950
Component?: React.ComponentType | null;
5051
ErrorBoundary?: React.ComponentType | null;
51-
lazy?: AgnosticNonIndexRouteObject["lazy"];
52+
lazy?: LazyRouteFunction<RouteObject>;
5253
}
5354

5455
export type RouteObject = IndexRouteObject | NonIndexRouteObject;

0 commit comments

Comments
 (0)