diff --git a/.changeset/rich-horses-dress.md b/.changeset/rich-horses-dress.md new file mode 100644 index 0000000000..8847a92f7a --- /dev/null +++ b/.changeset/rich-horses-dress.md @@ -0,0 +1,5 @@ +--- +"@heroui/system-rsc": patch +--- + +fix extendVariants return type error(#5778) diff --git a/packages/core/system-rsc/src/extend-variants.d.ts b/packages/core/system-rsc/src/extend-variants.d.ts index 2dceadae6d..afd764b77f 100644 --- a/packages/core/system-rsc/src/extend-variants.d.ts +++ b/packages/core/system-rsc/src/extend-variants.d.ts @@ -103,11 +103,11 @@ export type ExtendVariants = { }, opts?: Options, ): ForwardRefExoticComponent< - PropsWithoutRef< - CP & { - [key in keyof V]?: StringToBoolean; - } - > & + PropsWithoutRef<{ + [key in keyof CP | keyof V]?: + | (key extends keyof CP ? CP[key] : never) + | (key extends keyof V ? StringToBoolean : never); + }> & RefAttributes> >; };