import{_ as t,c as a,a2 as i,o as s}from"./chunks/framework.CehHI-68.js";const k=JSON.parse('{"title":"Interface: StyleDictionaryWriterConfig","description":"","frontmatter":{},"headers":[],"relativePath":"api/@theemo/style-dictionary/interfaces/StyleDictionaryWriterConfig.md","filePath":"api/@theemo/style-dictionary/interfaces/StyleDictionaryWriterConfig.md"}'),n={name:"api/@theemo/style-dictionary/interfaces/StyleDictionaryWriterConfig.md"};function r(o,e,h,d,l,p){return s(),a("div",null,e[0]||(e[0]=[i('<p><a href="./../../../packages">Theemo</a> / <a href="./../">@theemo/style-dictionary</a> / StyleDictionaryWriterConfig</p><h1 id="interface-styledictionarywriterconfig" tabindex="-1">Interface: StyleDictionaryWriterConfig <a class="header-anchor" href="#interface-styledictionarywriterconfig" aria-label="Permalink to &quot;Interface: StyleDictionaryWriterConfig&quot;">​</a></h1><p>The config for Style Dicitionary being used as <code>WriterTool</code>.</p><h2 id="remarks" tabindex="-1">Remarks <a class="header-anchor" href="#remarks" aria-label="Permalink to &quot;Remarks&quot;">​</a></h2><p>The result from <code>Lexer</code> is pushed into the writer. Such, the configuration requires you to provide the file for the respective token and the &quot;path&quot; (the canonical name of the token, so to say) within that file.</p><h2 id="properties" tabindex="-1">Properties <a class="header-anchor" href="#properties" aria-label="Permalink to &quot;Properties&quot;">​</a></h2><h3 id="datafortoken" tabindex="-1">dataForToken()? <a class="header-anchor" href="#datafortoken" aria-label="Permalink to &quot;dataForToken()?&quot;">​</a></h3><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">optional </span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">dataForToken</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: (</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">token</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Record</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">string, unknown</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span></code></pre></div><p>Customize the data for a token</p><h4 id="parameters" tabindex="-1">Parameters <a class="header-anchor" href="#parameters" aria-label="Permalink to &quot;Parameters&quot;">​</a></h4><table tabindex="0"><thead><tr><th>Parameter</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>token</code></td><td><code>Token</code>&lt;<code>&quot;unknown&quot;</code>&gt;</td><td>the Token</td></tr></tbody></table><h4 id="returns" tabindex="-1">Returns <a class="header-anchor" href="#returns" aria-label="Permalink to &quot;Returns&quot;">​</a></h4><p><code>Record</code>&lt;<code>string</code>, <code>unknown</code>&gt;</p><p>additional properties for a token</p><h4 id="defined-in" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in" aria-label="Permalink to &quot;Defined in&quot;">​</a></h4><p><a href="https://github.com/theemo-tokens/theemo/blob/7135571a3b0730b54741b0b30de8a9b8907a1a56/packages/@theemo/style-dictionary/src/config.ts#L50" target="_blank" rel="noreferrer">config.ts:50</a></p><hr><h3 id="directory" tabindex="-1">directory? <a class="header-anchor" href="#directory" aria-label="Permalink to &quot;directory?&quot;">​</a></h3><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">optional </span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">directory</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: string;</span></span></code></pre></div><p>The directory to which the tokens are written to</p><h4 id="default-value" tabindex="-1">Default Value <a class="header-anchor" href="#default-value" aria-label="Permalink to &quot;Default Value&quot;">​</a></h4><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">tokens</span></span></code></pre></div><h4 id="defined-in-1" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-1" aria-label="Permalink to &quot;Defined in&quot;">​</a></h4><p><a href="https://github.com/theemo-tokens/theemo/blob/7135571a3b0730b54741b0b30de8a9b8907a1a56/packages/@theemo/style-dictionary/src/config.ts#L17" target="_blank" rel="noreferrer">config.ts:17</a></p><hr><h3 id="filefortoken" tabindex="-1">fileForToken() <a class="header-anchor" href="#filefortoken" aria-label="Permalink to &quot;fileForToken()&quot;">​</a></h3><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">fileForToken</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: (</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">token</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> string;</span></span></code></pre></div><p>The file for the given token.</p><h4 id="parameters-1" tabindex="-1">Parameters <a class="header-anchor" href="#parameters-1" aria-label="Permalink to &quot;Parameters&quot;">​</a></h4><table tabindex="0"><thead><tr><th>Parameter</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>token</code></td><td><code>Token</code>&lt;<code>&quot;unknown&quot;</code>&gt;</td><td>the Token</td></tr></tbody></table><h4 id="returns-1" tabindex="-1">Returns <a class="header-anchor" href="#returns-1" aria-label="Permalink to &quot;Returns&quot;">​</a></h4><p><code>string</code></p><p>the file path</p><h4 id="defined-in-2" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-2" aria-label="Permalink to &quot;Defined in&quot;">​</a></h4><p><a href="https://github.com/theemo-tokens/theemo/blob/7135571a3b0730b54741b0b30de8a9b8907a1a56/packages/@theemo/style-dictionary/src/config.ts#L25" target="_blank" rel="noreferrer">config.ts:25</a></p><hr><h3 id="pathfortoken" tabindex="-1">pathForToken() <a class="header-anchor" href="#pathfortoken" aria-label="Permalink to &quot;pathForToken()&quot;">​</a></h3><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">pathForToken</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: (</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">token</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> string[];</span></span></code></pre></div><p>The path (the canonical name) of the token</p><h4 id="parameters-2" tabindex="-1">Parameters <a class="header-anchor" href="#parameters-2" aria-label="Permalink to &quot;Parameters&quot;">​</a></h4><table tabindex="0"><thead><tr><th>Parameter</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>token</code></td><td><code>Token</code>&lt;<code>&quot;unknown&quot;</code>&gt;</td><td>the Token</td></tr></tbody></table><h4 id="returns-2" tabindex="-1">Returns <a class="header-anchor" href="#returns-2" aria-label="Permalink to &quot;Returns&quot;">​</a></h4><p><code>string</code>[]</p><p>the segments of the name</p><h4 id="defined-in-3" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-3" aria-label="Permalink to &quot;Defined in&quot;">​</a></h4><p><a href="https://github.com/theemo-tokens/theemo/blob/7135571a3b0730b54741b0b30de8a9b8907a1a56/packages/@theemo/style-dictionary/src/config.ts#L33" target="_blank" rel="noreferrer">config.ts:33</a></p><hr><h3 id="valuefortoken" tabindex="-1">valueForToken()? <a class="header-anchor" href="#valuefortoken" aria-label="Permalink to &quot;valueForToken()?&quot;">​</a></h3><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">optional </span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">valueForToken</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: (</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">token</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">tokens</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=&gt;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> undefined</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> |</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> string;</span></span></code></pre></div><p>The value for the given token</p><h4 id="parameters-3" tabindex="-1">Parameters <a class="header-anchor" href="#parameters-3" aria-label="Permalink to &quot;Parameters&quot;">​</a></h4><table tabindex="0"><thead><tr><th>Parameter</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>token</code></td><td><code>Token</code>&lt;<code>&quot;unknown&quot;</code>&gt;</td><td>the Token</td></tr><tr><td><code>tokens</code></td><td><code>TokenCollection</code>&lt;<code>Token</code>&lt;<code>&quot;unknown&quot;</code>&gt;&gt;</td><td>all tokens</td></tr></tbody></table><h4 id="returns-3" tabindex="-1">Returns <a class="header-anchor" href="#returns-3" aria-label="Permalink to &quot;Returns&quot;">​</a></h4><p><code>undefined</code> | <code>string</code></p><p>the value for the given token</p><h4 id="defined-in-4" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-4" aria-label="Permalink to &quot;Defined in&quot;">​</a></h4><p><a href="https://github.com/theemo-tokens/theemo/blob/7135571a3b0730b54741b0b30de8a9b8907a1a56/packages/@theemo/style-dictionary/src/config.ts#L42" target="_blank" rel="noreferrer">config.ts:42</a></p>',57)]))}const u=t(n,[["render",r]]);export{k as __pageData,u as default};
