diff --git a/contributors.yml b/contributors.yml index 441271bea7..d38281c5b3 100644 --- a/contributors.yml +++ b/contributors.yml @@ -312,3 +312,4 @@ - yuleicul - zeromask1337 - zheng-chuang +- AlemTuzlak diff --git a/packages/react-router/index.ts b/packages/react-router/index.ts index 22d1bae6cd..6293a05e5b 100644 --- a/packages/react-router/index.ts +++ b/packages/react-router/index.ts @@ -43,6 +43,7 @@ export type { RedirectFunction, ShouldRevalidateFunction, ShouldRevalidateFunctionArgs, + LayoutComponentProps, UIMatch, } from "./lib/router/utils"; diff --git a/packages/react-router/lib/router/utils.ts b/packages/react-router/lib/router/utils.ts index c80dab7ccb..fb34ad3121 100644 --- a/packages/react-router/lib/router/utils.ts +++ b/packages/react-router/lib/router/utils.ts @@ -1,3 +1,4 @@ +import type { PropsWithChildren } from "react"; import type { Equal, Expect } from "../types/utils"; import type { Location, Path, To } from "./history"; import { invariant, parsePath, warning } from "./history"; @@ -192,6 +193,8 @@ export interface ShouldRevalidateFunction { (args: ShouldRevalidateFunctionArgs): boolean; } +export type LayoutComponentProps = PropsWithChildren; + export interface DataStrategyMatch extends AgnosticRouteMatch { shouldLoad: boolean;