-
Notifications
You must be signed in to change notification settings - Fork 70
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
TypeScript Variants Type Information Lost When Extending #185
Comments
@ryanelian This is a known issue that I'm still trying to decide how to solve. There is a way I know fixes it, but sadly that's a breaking change to how extending works, so I'm not yet sure if that's the route I want to go, but we'll see. |
We have the same issue. Multiple levels of inheritance seem like a pretty important use case; our case is also for buttons. |
I too have this same issue. Would be great to get will be watching this thread |
Any advice on an interim solution? |
My only advice here would be to extend plain objects before finally passing to |
Would be nice to have an option to pass a custom extend function, similar to how you can pass a custom |
Would you like some help with this? I'm willing to contribute some time to spike on some more backwards compatible solutions, but I'd like to sync up first to understand the full scope of this issue. |
Describe the bug
variants
declared in a variant is not carried over to subsequent variants when extended.Before I get chastised for doing this, I want to let everyone know that the reason I'm doing this is because Tailwind VS Code Intellisense breaks down and stop working when your variant gets too big, and I don't know how to fix it.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I expect the final function to contain the variants extended from the original and subsequent variants. Note below that
mode
is missing from the type information:Screenshots
Additional context
Using Visual Studio Code with TypeScript 5.4.5 in the project package.json
The text was updated successfully, but these errors were encountered: