diff --git a/.changeset/tiny-shoes-explain.md b/.changeset/tiny-shoes-explain.md new file mode 100644 index 0000000..72b8f78 --- /dev/null +++ b/.changeset/tiny-shoes-explain.md @@ -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. diff --git a/src/types/tokens/SingleGenericToken.ts b/src/types/tokens/SingleGenericToken.ts index 1e3732a..7b3fda4 100644 --- a/src/types/tokens/SingleGenericToken.ts +++ b/src/types/tokens/SingleGenericToken.ts @@ -4,13 +4,13 @@ import { ColorModifier } from '../Modifier.js'; type _SingleGenericToken = { 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 } };