From 6a9a75da006a871098b5e009646a247c99c3d122 Mon Sep 17 00:00:00 2001 From: Philzen Date: Tue, 10 Dec 2024 22:52:37 +0100 Subject: [PATCH] Simplify type using generic constraints instead of conditional type --- packages/router/src/Set.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/router/src/Set.tsx b/packages/router/src/Set.tsx index 422b49bcc7cc..9fc620be4097 100644 --- a/packages/router/src/Set.tsx +++ b/packages/router/src/Set.tsx @@ -9,7 +9,7 @@ export type WrapperType = ( }, ) => ReactElement | null -type SetProps

= (P extends React.FC ? React.ComponentProps

: unknown) & { +type SetProps

= React.ComponentProps

& { /** * P is the interface for the props that are forwarded to the wrapper * components. TypeScript will most likely infer this for you, but if you