diff --git a/packages/react-router/src/link.tsx b/packages/react-router/src/link.tsx index 8290f31ae7..977d84a414 100644 --- a/packages/react-router/src/link.tsx +++ b/packages/react-router/src/link.tsx @@ -240,11 +240,11 @@ export interface ToSubOptionsProps< in out TFrom extends RoutePaths | string = string, in out TTo extends string = '', > { - to?: undefined | ToPathOption & {} + to?: undefined | (ToPathOption & {}) hash?: undefined | true | Updater state?: undefined | true | NonNullableUpdater // The source route path. This is automatically set when using route-level APIs, but for type-safe relative routing on the router itself, this is required - from?: undefined | FromPathOption & {} + from?: undefined | (FromPathOption & {}) } export type ParamsReducerFn< @@ -347,7 +347,10 @@ interface MakeOptionalSearchParams< in out TFrom, in out TTo, > { - search?: undefined | true | (ParamsReducer & {}) + search?: + | undefined + | true + | (ParamsReducer & {}) } interface MakeOptionalPathParams< @@ -870,12 +873,18 @@ export interface ActiveLinkOptionProps { * A function that returns additional props for the `active` state of this link. * These props override other props passed to the link (`style`'s are merged, `className`'s are concatenated) */ - activeProps?: undefined | ActiveLinkAnchorProps | (() => ActiveLinkAnchorProps) + activeProps?: + | undefined + | ActiveLinkAnchorProps + | (() => ActiveLinkAnchorProps) /** * A function that returns additional props for the `inactive` state of this link. * These props override other props passed to the link (`style`'s are merged, `className`'s are concatenated) */ - inactiveProps?: undefined | ActiveLinkAnchorProps | (() => ActiveLinkAnchorProps) + inactiveProps?: + | undefined + | ActiveLinkAnchorProps + | (() => ActiveLinkAnchorProps) } export type LinkProps<