From 5cb2a1f63f707a48ada68559d828fbc7720e5fe9 Mon Sep 17 00:00:00 2001 From: Matt Brophy Date: Thu, 6 Jul 2023 12:21:08 -0400 Subject: [PATCH] Fix lazy typings (#10677) --- packages/react-router/lib/context.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/react-router/lib/context.ts b/packages/react-router/lib/context.ts index 0cf6b94208..a191a7f5f1 100644 --- a/packages/react-router/lib/context.ts +++ b/packages/react-router/lib/context.ts @@ -10,6 +10,7 @@ import type { StaticHandlerContext, To, TrackedPromise, + LazyRouteFunction, } from "@remix-run/router"; import type { Action as NavigationType } from "@remix-run/router"; @@ -30,7 +31,7 @@ export interface IndexRouteObject { errorElement?: React.ReactNode | null; Component?: React.ComponentType | null; ErrorBoundary?: React.ComponentType | null; - lazy?: AgnosticIndexRouteObject["lazy"]; + lazy?: LazyRouteFunction; } export interface NonIndexRouteObject { @@ -48,7 +49,7 @@ export interface NonIndexRouteObject { errorElement?: React.ReactNode | null; Component?: React.ComponentType | null; ErrorBoundary?: React.ComponentType | null; - lazy?: AgnosticNonIndexRouteObject["lazy"]; + lazy?: LazyRouteFunction; } export type RouteObject = IndexRouteObject | NonIndexRouteObject;