Skip to content

Commit

Permalink
fix: allow token value to be string for all types (references)
Browse files Browse the repository at this point in the history
  • Loading branch information
jorenbroekema committed Mar 14, 2024
1 parent a611e37 commit 93f1cc3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/tiny-shoes-explain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@tokens-studio/types': patch
---

Allow token value to be string for any token types, since it can always be a reference which is of type string.
8 changes: 4 additions & 4 deletions src/types/tokens/SingleGenericToken.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import { ColorModifier } from '../Modifier.js';
type _SingleGenericToken<T, V, Named, P> = {
type?: T;
$type?: T;
value?: V;
$value?: V;
rawValue?: V;
value?: V & string; // & string because token value can always be a reference!
$value?: V & string;
rawValue?: V & string;
description?: string;
$description?: string;
oldDescription?: string;
oldValue?: V;
oldValue?: V & string;
internal__Parent?: string;
inheritTypeLevel?: number;
$extensions?: { 'studio.tokens': { modify: ColorModifier } };
Expand Down

0 comments on commit 93f1cc3

Please sign in to comment.