From d441ec59acc18d62411ca4b50352c1a657f8a2de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Lesiecki?= Date: Wed, 5 Nov 2025 13:10:12 +0100 Subject: [PATCH 1/2] Enable `VarDeclaration` type extraction from `createVar` function parameters --- packages/css/src/vars.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/css/src/vars.ts b/packages/css/src/vars.ts index 806ac4520..9b26eb1c5 100644 --- a/packages/css/src/vars.ts +++ b/packages/css/src/vars.ts @@ -38,11 +38,11 @@ const buildPropertyRule = ({ ...(initialValue != null ? { initialValue } : {}), }); +export function createVar(debugId?: string): CSSVarFunction; export function createVar( declaration: VarDeclaration, debugId?: string, ): CSSVarFunction; -export function createVar(debugId?: string): CSSVarFunction; export function createVar( debugIdOrDeclaration?: string | VarDeclaration, debugId?: string, From 40adbc946c0a6178c6892be634dd73c00ab0631c Mon Sep 17 00:00:00 2001 From: Adam Skoufis Date: Sun, 7 Dec 2025 18:18:26 +1100 Subject: [PATCH 2/2] Create little-mangos-type.md --- .changeset/little-mangos-type.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/little-mangos-type.md diff --git a/.changeset/little-mangos-type.md b/.changeset/little-mangos-type.md new file mode 100644 index 000000000..6b0f3894d --- /dev/null +++ b/.changeset/little-mangos-type.md @@ -0,0 +1,5 @@ +--- +"@vanilla-extract/css": patch +--- + +Swap the order of `createVar`'s overloads to enable inference of `VarDelcaration` type