Skip to content

Enable the VarDeclaration type inference from the createVar parameters#1646

Merged
askoufis merged 3 commits intovanilla-extract-css:masterfrom
plesiecki:patch-1
Dec 7, 2025
Merged

Enable the VarDeclaration type inference from the createVar parameters#1646
askoufis merged 3 commits intovanilla-extract-css:masterfrom
plesiecki:patch-1

Conversation

@plesiecki
Copy link
Contributor

Hello,
I'd like to suggest a tiny change to createVar type declarations order. This will enable an inference of the VarDeclaration type from the createVar parameters.

type VarDeclaration = Parameters<typeof createVar>[0];

For overloaded functions, this will be the parameters of the last signature;
(source)

@changeset-bot
Copy link

changeset-bot bot commented Nov 5, 2025

🦋 Changeset detected

Latest commit: 2d90a98

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 10 packages
Name Type
@vanilla-extract/css Patch
@vanilla-extract/compiler Patch
@vanilla-extract/integration Patch
@vanilla-extract/rollup-plugin Patch
@vanilla-extract/vite-plugin Patch
@vanilla-extract/esbuild-plugin Patch
@vanilla-extract/jest-transform Patch
@vanilla-extract/parcel-transformer Patch
@vanilla-extract/webpack-plugin Patch
@vanilla-extract/next-plugin Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

@askoufis askoufis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

@askoufis askoufis enabled auto-merge (squash) December 7, 2025 07:22
@askoufis askoufis disabled auto-merge December 7, 2025 07:22
@askoufis askoufis enabled auto-merge (squash) December 7, 2025 07:22
@askoufis askoufis merged commit 0b2c09e into vanilla-extract-css:master Dec 7, 2025
5 checks passed
@askoufis
Copy link
Contributor

@plesiecki This was released in @vanilla-extract/css@1.18.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants