Describe the bug
Typescript shows a number of errors
node_modules/tailwind-variants/dist/index.d.ts:216:35 - error TS2344: Type 'V' does not satisfy the constraint 'TVVariantsDefault<S, undefined>'.
Type 'TVVariants<S, B, EV, undefined>' is not assignable to type 'TVVariantsDefault<S, undefined>'.
Type 'TVVariantsDefault<S, B> | { [K in keyof EV]?: { [K2 in keyof EV[K]]?: (S extends TVSlots ? ClassValue | SlotsClassValue<S, B> : ClassValue) | undefined; } | undefined; }' is not assignable to type 'TVVariantsDefault<S, undefined>'.
Type '{ [K in keyof EV]?: { [K2 in keyof EV[K]]?: (S extends TVSlots ? ClassValue | SlotsClassValue<S, B> : ClassValue) | undefined; } | undefined; }' is not assignable to type 'TVVariantsDefault<S, undefined>'.
Type '{ [K2 in keyof EV[K]]?: (S extends TVSlots ? ClassValue | SlotsClassValue<S, B> : ClassValue) | undefined; } | undefined' is not assignable to type '{ [key: string]: S extends TVSlots ? ClassValue | SlotsClassValue<S, undefined> : ClassValue; }'.
Type 'undefined' is not assignable to type '{ [key: string]: S extends TVSlots ? ClassValue | SlotsClassValue<S, undefined> : ClassValue; }'.
Type 'TVVariants<S, B, TVVariants<ES, B, E["variants"], ES>, undefined>' is not assignable to type 'TVVariantsDefault<S, undefined>'.
Type 'TVVariantsDefault<S, B> | { [K in keyof TVVariants<ES, B, E["variants"], ES>]?: { [K2 in keyof TVVariants<ES, B, E["variants"], ES>[K]]?: (S extends TVSlots ? ClassValue | SlotsClassValue<...> : ClassValue) | undefined; } | undefined; }' is not assignable to type 'TVVariantsDefault<S, undefined>'.
Type '{ [K in keyof TVVariants<ES, B, E["variants"], ES>]?: { [K2 in keyof TVVariants<ES, B, E["variants"], ES>[K]]?: (S extends TVSlots ? ClassValue | SlotsClassValue<...> : ClassValue) | undefined; } | undefined; }' is not assignable to type 'TVVariantsDefault<S, undefined>'.
Type '{ [K2 in keyof TVVariants<ES, B, E["variants"], ES>[K]]?: (S extends TVSlots ? ClassValue | SlotsClassValue<S, B> : ClassValue) | undefined; } | undefined' is not assignable to type '{ [key: string]: S extends TVSlots ? ClassValue | SlotsClassValue<S, undefined> : ClassValue; }'.
Type 'undefined' is not assignable to type '{ [key: string]: S extends TVSlots ? ClassValue | SlotsClassValue<S, undefined> : ClassValue; }'.
Type 'TVVariantsDefault<S, B> | { [x: string]: { [x: string]: (S extends TVSlots ? ClassValue | SlotsClassValue<S, B> : ClassValue) | undefined; } | undefined; }' is not assignable to type 'TVVariantsDefault<S, undefined>'.
Type '{ [x: string]: { [x: string]: (S extends TVSlots ? ClassValue | SlotsClassValue<S, B> : ClassValue) | undefined; } | undefined; }' is not assignable to type 'TVVariantsDefault<S, undefined>'.
'string' index signatures are incompatible.
Type '{ [x: string]: (S extends TVSlots ? ClassValue | SlotsClassValue<S, B> : ClassValue) | undefined; } | undefined' is not assignable to type '{ [key: string]: S extends TVSlots ? ClassValue | SlotsClassValue<S, undefined> : ClassValue; }'.
Type 'undefined' is not assignable to type '{ [key: string]: S extends TVSlots ? ClassValue | SlotsClassValue<S, undefined> : ClassValue; }'.
216 CV extends TVCompoundVariants<V, S, B, EV, ES>,
~
node_modules/tailwind-variants/dist/index.d.ts:217:34 - error TS2344: Type 'V' does not satisfy the constraint 'TVVariantsDefault<S, undefined>'.
217 DV extends TVDefaultVariants<V, S, EV, ES>,
~
node_modules/tailwind-variants/dist/index.d.ts:223:7 - error TS2344: Type 'V' does not satisfy the constraint 'TVVariantsDefault<S, undefined>'.
223 V,
~
node_modules/tailwind-variants/dist/index.d.ts:263:39 - error TS2344: Type 'V' does not satisfy the constraint 'TVVariantsDefault<S, undefined>'.
263 compoundSlots?: TVCompoundSlots<V, S, B>;
~
node_modules/tailwind-variants/dist/index.d.ts:275:19 - error TS2344: Type 'V' does not satisfy the constraint 'TVVariantsDefault<S, undefined>'.
275 ): TVReturnType<V, S, B, C, EV, ES, E>;
~
Found 7 errors in 2 files.
To Reproduce
Typescript 4.8.4 use react-aria and tsc
Describe the bug Typescript shows a number of errors
To Reproduce Typescript 4.8.4 use react-aria and tsc
tsconfig:
Expected behavior Not have typescript errors
Additional context Add any other context about the problem here.