-
-
Notifications
You must be signed in to change notification settings - Fork 110
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
Compiling TypeScript with --declaration
flag set results in an error
#27
Comments
Seems like a duplicate of #5 – which I never really found out was the solution was 🤔 I think you just need to add If so, I'll get something added to the README |
Ah I see, I didn't catch that other issue, and I get why you don't want to expose the interface. Adding |
Just for context, the use case for setting I have a feeling that this issue cannot be solved by changing a tsconfig option (apart from setting declaration to Whilst my typescript knowledge is definitely not perfect, from what I can gather, I am also fairly certain that we'd see the same issue appear for I'm sort of convinced at this point that exporting the types is the correct thing to do, but I also want to respect your decision as the maintainer if you want the package API to be a certain way. A benefit of exporting the types is that it makes it easier to extend on cva. For example, I spend most of my time with React, so when using cva I will have to map the |
OK I think I've found a quick-fix; it's a little annoying but it works fine |
Published under version |
Tested with you repro; seems to work great |
Describe the bug
When compiling a TypeScript project with the
--declaration
flag set, given that the project also makes public some type that usesVariantProps
, TypeScript will throw an error like:To Reproduce
Create a TypeScript project that exports a type that uses
VariantProps
in some way, and then try to compile with the--declaration
flag set.See repro here.
Expected behavior
There should be no error thrown.
This appears to be caused by
ClassProp
not being exported from the packageThe text was updated successfully, but these errors were encountered: