From 7bea20151a13b314d62d96f7230abca4491b5390 Mon Sep 17 00:00:00 2001 From: John Blossom Date: Sun, 22 Oct 2023 12:31:02 -0600 Subject: [PATCH] fix for typescript error on strict builds --- src/tailwind.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tailwind.tsx b/src/tailwind.tsx index 08a6e3d..626820c 100644 --- a/src/tailwind.tsx +++ b/src/tailwind.tsx @@ -64,7 +64,7 @@ type MergeProps = // RemoveIndex

is used to make React.ComponentPropsWithRef typesafe on Tailwind components, delete if causing issues type TailwindPropHelper< - P, + P extends object = {}, O extends object = {} // PickU is needed here to make $as typing work > = PickU, keyof MergeProps> @@ -73,7 +73,7 @@ type TailwindComponentPropsWith$As< P extends object, O extends object, $As extends string | React.ComponentType = React.ComponentType

, - P2 = $As extends AnyTailwindComponent + P2 extends object = $As extends AnyTailwindComponent ? TailwindComponentAllInnerProps<$As> : $As extends IntrinsicElementsKeys | React.ComponentType ? React.ComponentPropsWithRef<$As>