-
Notifications
You must be signed in to change notification settings - Fork 273
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
Export PatternOptions and VariantGroups types? #694
Comments
You could always pull the types out with TS, for example:
Does this help? |
This works but is there any reason not to export them? |
Quoting a reply on discord to a similar question:
|
I see. Thank for the answers. |
Hi all, following up on this issue (I can open a new one if preferred), we tried a similar workaround to the one proposed by @graup, but it introduced a huge performance regression when replacing type VarargParameters<T extends (args: any) => any> = T extends (args: infer P) => any ? P : never;
type SprinklesProperties = VarargParameters<typeof createSprinkles>; I've ran a CPU profile on the library using this, and it is very clearly pointing at the computation in The difference is ~5 seconds (with Does anyone else face similar issues? I think the culprit here is that I'm open to suggestions, but this is currently a blocker for us to upgrade to any newer version of Sprinkles. |
Reopened this discussion with a PR and an argument to make export these types: #1204 |
Could
PatternOptions
andVariantGroups
be exported in@vanilla-extract/recipes
to allow creating extendable recipes?Example:
There are ways to make it work without them but at the expense of losing auto-suggestions.
The text was updated successfully, but these errors were encountered: