Skip to content

Commit

Permalink
Fix lazy typings (#10677)
Browse files Browse the repository at this point in the history
  • Loading branch information
brophdawg11 authored Jul 6, 2023
1 parent bbc7715 commit 5cb2a1f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/react-router/lib/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import type {
StaticHandlerContext,
To,
TrackedPromise,
LazyRouteFunction,
} from "@remix-run/router";
import type { Action as NavigationType } from "@remix-run/router";

Expand All @@ -30,7 +31,7 @@ export interface IndexRouteObject {
errorElement?: React.ReactNode | null;
Component?: React.ComponentType | null;
ErrorBoundary?: React.ComponentType | null;
lazy?: AgnosticIndexRouteObject["lazy"];
lazy?: LazyRouteFunction<RouteObject>;
}

export interface NonIndexRouteObject {
Expand All @@ -48,7 +49,7 @@ export interface NonIndexRouteObject {
errorElement?: React.ReactNode | null;
Component?: React.ComponentType | null;
ErrorBoundary?: React.ComponentType | null;
lazy?: AgnosticNonIndexRouteObject["lazy"];
lazy?: LazyRouteFunction<RouteObject>;
}

export type RouteObject = IndexRouteObject | NonIndexRouteObject;
Expand Down

0 comments on commit 5cb2a1f

Please sign in to comment.