Skip to content

Commit

Permalink
Improve type hint of recipe's runtime fn (#1341)
Browse files Browse the repository at this point in the history
Co-authored-by: Adam Skoufis <askoufis@users.noreply.github.com>
  • Loading branch information
levrik and askoufis committed Mar 4, 2024
1 parent 003467f commit 3f8b653
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/weak-cherries-beg.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@vanilla-extract/recipes": patch
---

Resolve recipe function input type to simplify hover type
2 changes: 1 addition & 1 deletion packages/recipes/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export type RecipeClassNames<Variants extends VariantGroups> = {
};

export type RuntimeFn<Variants extends VariantGroups> = ((
options?: VariantSelection<Variants>,
options?: Resolve<VariantSelection<Variants>>,
) => string) & {
variants: () => (keyof Variants)[];
classNames: RecipeClassNames<Variants>;
Expand Down

0 comments on commit 3f8b653

Please sign in to comment.