From c4592c9a0489d38681ca023ffe26cbf917664fff Mon Sep 17 00:00:00 2001 From: WK Wong Date: Sat, 17 Aug 2024 12:59:29 +0800 Subject: [PATCH] fix(system-rsc): incorrect VariantValue typing and typo in Options --- packages/core/system-rsc/src/extend-variants.d.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/core/system-rsc/src/extend-variants.d.ts b/packages/core/system-rsc/src/extend-variants.d.ts index 4a69393da8..3ef30a7bee 100644 --- a/packages/core/system-rsc/src/extend-variants.d.ts +++ b/packages/core/system-rsc/src/extend-variants.d.ts @@ -32,10 +32,11 @@ type ComposeVariants = SuggestedVariants | Variants; type VariantValue = { [K in keyof V | keyof SV]?: - | (K extends keyof V ? StringToBoolean | (keyof V[K])[] : never) + | (K extends keyof V ? StringToBoolean : never) + | (K extends keyof V ? StringToBoolean[] : never) | (K extends keyof SV ? ValidateSubtype extends "true" - ? keyof OmitUndefined | (keyof OmitUndefined)[] | undefined + ? keyof OmitUndefined : never : never); }; @@ -47,7 +48,7 @@ type CompoundVariants = Array & ClassProp type Options = { /** * Whether to merge the class names with `tailwind-merge` library. - * It's avoided to have duplicate tailwind classes. (Recommended) + * It avoids to have duplicate tailwind classes. (Recommended) * @see https://github.com/dcastil/tailwind-merge/blob/v1.8.1/README.md * @default true */