Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/little-mangos-type.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@vanilla-extract/css": patch
---

Swap the order of `createVar`'s overloads to enable inference of `VarDelcaration` type
2 changes: 1 addition & 1 deletion packages/css/src/vars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down