Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"VariantsOf" type incompatibility #12

Open
mertturkmenoglu opened this issue Nov 13, 2022 · 3 comments
Open

"VariantsOf" type incompatibility #12

mertturkmenoglu opened this issue Nov 13, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@mertturkmenoglu
Copy link

Hi everyone,

I'm just trying this library and I'm looking at the TypeScript support.

When I try the example here https://github.com/mattvalleycodes/variant-classnames#nested-properties-auto-complete,
TypeScript gives me an error:

TS2345: Argument of type 'VariantsOf<Props, $Hooks1<OmitType<Required<Props>, Function>>>' is not assignable to parameter of type 'RootVariations'.   Type 'VariantsOf<Props, $Hooks1<OmitType<Required<Props>, Function>>>' is not assignable to type '{ $forward?: MaybeString; }'.     Types of property '$forward' are incompatible.       Type 'string | { [x: string]: string | VariantsOf<$Hooks1<Omit<$Hooks1<OmitType<Required<Props>, Function>>, "$forward">>, $Hooks1<...>> | undefined; } | undefined' is not assignable to type 'MaybeString'.         Type '{ [x: string]: string | VariantsOf<$Hooks1<Omit<$Hooks1<OmitType<Required<Props>, Function>>, "$forward">>, $Hooks1<OmitType<Required<$Hooks1<Omit<$Hooks1<...>, "$forward">>>, Function>>> | undefined; }' is not assignable to type 'MaybeString'.

Library versions:

  • variant-classnames: ^1.2.0
  • react: 18.2.0
  • typescript: 4.8.2

Can you help me with this issue?

Thank you.

@mattvalleycodes
Copy link
Owner

@mertturkmenoglu Hi there; we're aware of this and will work on this to fix it. For the time being, I would recommend to use // @ts-ignore

cc @jhesgodi

@mattvalleycodes mattvalleycodes added the bug Something isn't working label Nov 15, 2022
@mertturkmenoglu
Copy link
Author

Thank you @mattvalleycodes. Appreciate it.

@dev-frid
Copy link

dev-frid commented Apr 4, 2023

Hey, neat little library. Any update on this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants