Skip to content

Commit 0428749

Browse files
committed
v9.5.0-beta.1
1 parent 9db1740 commit 0428749

536 files changed

Lines changed: 1738 additions & 1201 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎coverage.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"tests":9000,"assertions":37880,"lines":{"total":5107,"covered":5107,"skipped":0,"pct":100},"statements":{"total":5527,"covered":5527,"skipped":0,"pct":100},"functions":{"total":2424,"covered":2424,"skipped":0,"pct":100},"branches":{"total":1761,"covered":1761,"skipped":0,"pct":100},"branchesTrue":{"total":0,"covered":0,"skipped":0,"pct":100}}
1+
{"tests":9038,"assertions":38112,"lines":{"total":5117,"covered":5117,"skipped":0,"pct":100},"statements":{"total":5537,"covered":5537,"skipped":0,"pct":100},"functions":{"total":2428,"covered":2428,"skipped":0,"pct":100},"branches":{"total":1791,"covered":1791,"skipped":0,"pct":100},"branchesTrue":{"total":0,"covered":0,"skipped":0,"pct":100}}

‎docs/api/all.html‎

Lines changed: 132 additions & 50 deletions
Large diffs are not rendered by default.

‎docs/api/mergeable-store/interfaces/mergeable/mergeablestore/methods/setter/setschema/article.html‎

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
1-
<nav><ul><li><a href="/">TinyBase</a></li><li><a href="/api/">API</a></li><li><a href="/api/mergeable-store/"><code>mergeable-store</code></a></li><li><a href="/api/mergeable-store/interfaces/">Interfaces</a></li><li><a href="/api/mergeable-store/interfaces/mergeable/mergeablestore/"><code>MergeableStore</code></a></li><li><a href="/api/mergeable-store/interfaces/mergeable/mergeablestore/methods/setter/">Setter methods</a></li><li><a href="/api/mergeable-store/interfaces/mergeable/mergeablestore/methods/setter/setschema/"><code>setSchema</code></a></li></ul></nav><section class="s1" id="/api/mergeable-store/interfaces/mergeable/mergeablestore/methods/setter/setschema/" data-id="sS2"><h1><code>setSchema</code></h1><p>The <code>setSchema</code> method lets you specify the <a href="/api/store/type-aliases/schema/tablesschema/"><code>TablesSchema</code></a> and <a href="/api/store/type-aliases/schema/valuesschema/"><code>ValuesSchema</code></a> of the <a href="/api/the-essentials/creating-stores/store/"><code>Store</code></a>.</p><pre><code><span class="function"><a href="/api/mergeable-store/interfaces/mergeable/mergeablestore/methods/setter/setschema/">setSchema</a></span><span class="punctuation">(</span>
2-
tablesSchema<span class="operator">:</span> <span class="type"><a href="/api/store/type-aliases/schema/tablesschema/">TablesSchema</a></span><span class="punctuation">,</span>
3-
valuesSchema<span class="operator">?</span><span class="operator">:</span> <span class="type"><a href="/api/store/type-aliases/schema/valuesschema/">ValuesSchema</a></span><span class="punctuation">,</span>
4-
<span class="punctuation">)</span><span class="operator">:</span> <span class="keyword">this</span></code></pre><div class="table"><table><tr><th></th><th>Type</th><th>Description</th></tr><tr><th><code>tablesSchema</code></th><td><code><span class="type"><a href="/api/store/type-aliases/schema/tablesschema/">TablesSchema</a></span></code></td><td><p>The <a href="/api/store/type-aliases/schema/tablesschema/"><code>TablesSchema</code></a> to be set for the <a href="/api/the-essentials/creating-stores/store/"><code>Store</code></a>.</p></td></tr><tr><th><code>valuesSchema<span class="operator">?</span></code></th><td><code><span class="type"><a href="/api/store/type-aliases/schema/valuesschema/">ValuesSchema</a></span></code></td><td><p>The <a href="/api/store/type-aliases/schema/valuesschema/"><code>ValuesSchema</code></a> to be set for the <a href="/api/the-essentials/creating-stores/store/"><code>Store</code></a>.</p></td></tr><tr><th class="right">returns</th><td><code><span class="keyword">this</span></code></td><td><p></p><p>A reference to the <a href="/api/the-essentials/creating-stores/store/"><code>Store</code></a>.</p><p></p></td></tr></table></div><p>Note that this may result in a change to data in the <a href="/api/the-essentials/creating-stores/store/"><code>Store</code></a>, as defaults are applied or as invalid <a href="/api/store/type-aliases/store/table/"><code>Table</code></a>, <a href="/api/store/type-aliases/store/row/"><code>Row</code></a>, <a href="/api/store/type-aliases/store/cell/"><code>Cell</code></a>, or <a href="/api/store/type-aliases/store/value/"><code>Value</code></a> objects are removed. These changes will fire any listeners to that data, as expected.</p><p>From v3.0 onwards, this method takes two arguments. The first is the <a href="/api/store/type-aliases/schema/tablesschema/"><code>TablesSchema</code></a> object, the second the <a href="/api/store/type-aliases/schema/valuesschema/"><code>ValuesSchema</code></a>. In previous versions (before the existence of the <a href="/api/store/type-aliases/schema/valuesschema/"><code>ValuesSchema</code></a> data structure), only the first was present. For backwards compatibility the new second parameter is optional.</p><section class="s2"><h2>Examples</h2><p>This example sets the <a href="/api/store/type-aliases/schema/tablesschema/"><code>TablesSchema</code></a> and <a href="/api/store/type-aliases/schema/valuesschema/"><code>ValuesSchema</code></a> of a <a href="/api/the-essentials/creating-stores/store/"><code>Store</code></a> after it has been created.</p><pre><code><span class="keyword">import</span> <span class="punctuation">{</span>createStore<span class="punctuation">}</span> <span class="keyword">from</span> <span class="string">'tinybase'</span><span class="punctuation">;</span>
1+
<nav><ul><li><a href="/">TinyBase</a></li><li><a href="/api/">API</a></li><li><a href="/api/mergeable-store/"><code>mergeable-store</code></a></li><li><a href="/api/mergeable-store/interfaces/">Interfaces</a></li><li><a href="/api/mergeable-store/interfaces/mergeable/mergeablestore/"><code>MergeableStore</code></a></li><li><a href="/api/mergeable-store/interfaces/mergeable/mergeablestore/methods/setter/">Setter methods</a></li><li><a href="/api/mergeable-store/interfaces/mergeable/mergeablestore/methods/setter/setschema/"><code>setSchema</code></a></li></ul></nav><section class="s1" id="/api/mergeable-store/interfaces/mergeable/mergeablestore/methods/setter/setschema/" data-id="sS2"><h1><code>setSchema</code></h1><p>The <code>setSchema</code> method lets you specify the <a href="/api/store/type-aliases/schema/tablesschema/"><code>TablesSchema</code></a> and <a href="/api/store/type-aliases/schema/valuesschema/"><code>ValuesSchema</code></a> of the <a href="/api/the-essentials/creating-stores/store/"><code>Store</code></a>.</p><pre><code><span class="generic-function"><span class="function"><a href="/api/mergeable-store/interfaces/mergeable/mergeablestore/methods/setter/setschema/">setSchema</a></span><span class="generic"><span class="operator">&lt;</span><span class="constant">TS</span><span class="punctuation">,</span> <span class="constant">VS</span><span class="operator">></span></span></span><span class="punctuation">(</span>
2+
tablesSchema<span class="operator">:</span> <span class="punctuation">(</span>
3+
<span class="constant">TS</span> <span class="operator">&amp;</span>
4+
<span class="type"><a href="/api/store/type-aliases/other/validtablesschema/">ValidTablesSchema</a></span><span class="operator">&lt;</span><span class="constant">TS</span><span class="operator">></span>
5+
<span class="punctuation">)</span><span class="punctuation">,</span>
6+
valuesSchema<span class="operator">?</span><span class="operator">:</span> <span class="punctuation">(</span>
7+
<span class="constant">VS</span> <span class="operator">&amp;</span>
8+
<span class="type"><a href="/api/store/type-aliases/other/validvaluesschema/">ValidValuesSchema</a></span><span class="operator">&lt;</span><span class="constant">VS</span><span class="operator">></span>
9+
<span class="punctuation">)</span><span class="punctuation">,</span>
10+
<span class="punctuation">)</span><span class="operator">:</span> <span class="keyword">this</span></code></pre><div class="table"><table><tr><th></th><th>Type</th><th>Description</th></tr><tr><th><code>tablesSchema</code></th><td><code><span class="punctuation">(</span> <span class="constant">TS</span> <span class="operator">&amp;</span> <span class="type"><a href="/api/store/type-aliases/other/validtablesschema/">ValidTablesSchema</a></span><span class="operator">&lt;</span><span class="constant">TS</span><span class="operator">></span> <span class="punctuation">)</span></code></td><td><p>The <a href="/api/store/type-aliases/schema/tablesschema/"><code>TablesSchema</code></a> to be set for the <a href="/api/the-essentials/creating-stores/store/"><code>Store</code></a>.</p></td></tr><tr><th><code>valuesSchema<span class="operator">?</span></code></th><td><code><span class="punctuation">(</span> <span class="constant">VS</span> <span class="operator">&amp;</span> <span class="type"><a href="/api/store/type-aliases/other/validvaluesschema/">ValidValuesSchema</a></span><span class="operator">&lt;</span><span class="constant">VS</span><span class="operator">></span> <span class="punctuation">)</span></code></td><td><p>The <a href="/api/store/type-aliases/schema/valuesschema/"><code>ValuesSchema</code></a> to be set for the <a href="/api/the-essentials/creating-stores/store/"><code>Store</code></a>.</p></td></tr><tr><th class="right">returns</th><td><code><span class="keyword">this</span></code></td><td><p></p><p>A reference to the <a href="/api/the-essentials/creating-stores/store/"><code>Store</code></a>.</p><p></p></td></tr></table></div><p>Note that this may result in a change to data in the <a href="/api/the-essentials/creating-stores/store/"><code>Store</code></a>, as defaults are applied or as invalid <a href="/api/store/type-aliases/store/table/"><code>Table</code></a>, <a href="/api/store/type-aliases/store/row/"><code>Row</code></a>, <a href="/api/store/type-aliases/store/cell/"><code>Cell</code></a>, or <a href="/api/store/type-aliases/store/value/"><code>Value</code></a> objects are removed. These changes will fire any listeners to that data, as expected.</p><p>From v3.0 onwards, this method takes two arguments. The first is the <a href="/api/store/type-aliases/schema/tablesschema/"><code>TablesSchema</code></a> object, the second the <a href="/api/store/type-aliases/schema/valuesschema/"><code>ValuesSchema</code></a>. In previous versions (before the existence of the <a href="/api/store/type-aliases/schema/valuesschema/"><code>ValuesSchema</code></a> data structure), only the first was present. For backwards compatibility the new second parameter is optional.</p><section class="s2"><h2>Examples</h2><p>This example sets the <a href="/api/store/type-aliases/schema/tablesschema/"><code>TablesSchema</code></a> and <a href="/api/store/type-aliases/schema/valuesschema/"><code>ValuesSchema</code></a> of a <a href="/api/the-essentials/creating-stores/store/"><code>Store</code></a> after it has been created.</p><pre><code><span class="keyword">import</span> <span class="punctuation">{</span>createStore<span class="punctuation">}</span> <span class="keyword">from</span> <span class="string">'tinybase'</span><span class="punctuation">;</span>
511

612
<span class="keyword">const</span> store <span class="operator">=</span> <span class="function"><a href="/api/the-essentials/creating-stores/createstore/">createStore</a></span><span class="punctuation">(</span><span class="punctuation">)</span><span class="punctuation">.</span><span class="function"><a href="/api/mergeable-store/interfaces/mergeable/mergeablestore/methods/setter/setschema/">setSchema</a></span><span class="punctuation">(</span>
713
<span class="punctuation">{</span>

0 commit comments

Comments
 (0)