Skip to content

Commit eb87bc3

Browse files
committed
[docs] Minor typo
1 parent 53e906b commit eb87bc3

File tree

8 files changed

+9
-9
lines changed

8 files changed

+9
-9
lines changed

docs/api/all.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5284,7 +5284,7 @@
52845284

52855285
persister<span class="punctuation">.</span><span class="function">destroy</span><span class="punctuation">(</span><span class="punctuation">)</span><span class="punctuation">;</span>
52865286
sessionStorage<span class="punctuation">.</span><span class="function"><a href="#/api/checkpoints/interfaces/checkpoints/checkpoints/methods/lifecycle/clear/">clear</a></span><span class="punctuation">(</span><span class="punctuation">)</span><span class="punctuation">;</span>
5287-
</code></pre></section></section><section class="s6" id="/api/persisters/interfaces/persister/persister/methods/save/startautosave/" data-id="sAS"><h6><code>startAutoSave</code></h6><p>The <a href="#/api/persisters/interfaces/persister/persister/methods/save/save/"><code>save</code></a> method takes data from the <a href="#/api/store/interfaces/store/store/"><code>Store</code></a> with which the <a href="#/api/persisters/interfaces/persister/persister/"><code>Persister</code></a> is associated and persists it into storage, once, and then continuously.</p><pre><code><span class="function"><a href="#/api/persisters/interfaces/persister/persister/methods/save/startautosave/">startAutoSave</a></span><span class="punctuation">(</span><span class="punctuation">)</span><span class="operator">:</span> <span class="builtin">Promise</span><span class="operator">&lt;</span><span class="type"><a href="#/api/persisters/interfaces/persister/persister/">Persister</a></span><span class="operator">></span></code></pre><div class="table"><table><tr><th class="right">returns</th><td><code><span class="builtin">Promise</span><span class="operator">&lt;</span><span class="type"><a href="#/api/persisters/interfaces/persister/persister/">Persister</a></span><span class="operator">></span></code></td><td><p></p><p>A Promise containing a reference to the <a href="#/api/persisters/interfaces/persister/persister/"><code>Persister</code></a> object.</p><p></p></td></tr></table></div><p>This method first runs a single call to the <a href="#/api/persisters/interfaces/persister/persister/methods/save/save/"><code>save</code></a> method to ensure the data is in sync with the persisted storage. It then continues to watch for changes to the <a href="#/api/store/interfaces/store/store/"><code>Store</code></a>, automatically saving the data to storage.</p><p>This method is asynchronous because it starts by making a single call to the asynchronous <a href="#/api/persisters/interfaces/persister/persister/methods/save/save/"><code>save</code></a> method. Even for those storage types that are synchronous (like browser storage) it is still recommended that you <code>await</code> calls to this method or handle the return type natively as a Promise.</p><section class="s7"><h6>Example</h6><p>This example creates a <a href="#/api/store/interfaces/store/store/"><code>Store</code></a> with some data, and saves into the browser&#x27;s session storage. Subsequent changes to the <a href="#/api/store/interfaces/store/store/"><code>Store</code></a> are then automatically saved to the underlying storage.</p><pre><code><span class="keyword">const</span> store <span class="operator">=</span> <span class="function"><a href="#/api/store/functions/creation/createstore/">createStore</a></span><span class="punctuation">(</span><span class="punctuation">)</span><span class="punctuation">.</span><span class="function"><a href="#/api/store/interfaces/store/store/methods/setter/settables/">setTables</a></span><span class="punctuation">(</span><span class="punctuation">{</span><span class="literal-property">pets</span><span class="operator">:</span> <span class="punctuation">{</span><span class="literal-property">fido</span><span class="operator">:</span> <span class="punctuation">{</span><span class="literal-property">species</span><span class="operator">:</span> <span class="string">'dog'</span><span class="punctuation">}</span><span class="punctuation">}</span><span class="punctuation">}</span><span class="punctuation">)</span><span class="punctuation">;</span>
5287+
</code></pre></section></section><section class="s6" id="/api/persisters/interfaces/persister/persister/methods/save/startautosave/" data-id="sAS"><h6><code>startAutoSave</code></h6><p>The <code>startAutoSave</code> method takes data from the <a href="#/api/store/interfaces/store/store/"><code>Store</code></a> with which the <a href="#/api/persisters/interfaces/persister/persister/"><code>Persister</code></a> is associated and persists it into storage, once, and then continuously.</p><pre><code><span class="function"><a href="#/api/persisters/interfaces/persister/persister/methods/save/startautosave/">startAutoSave</a></span><span class="punctuation">(</span><span class="punctuation">)</span><span class="operator">:</span> <span class="builtin">Promise</span><span class="operator">&lt;</span><span class="type"><a href="#/api/persisters/interfaces/persister/persister/">Persister</a></span><span class="operator">></span></code></pre><div class="table"><table><tr><th class="right">returns</th><td><code><span class="builtin">Promise</span><span class="operator">&lt;</span><span class="type"><a href="#/api/persisters/interfaces/persister/persister/">Persister</a></span><span class="operator">></span></code></td><td><p></p><p>A Promise containing a reference to the <a href="#/api/persisters/interfaces/persister/persister/"><code>Persister</code></a> object.</p><p></p></td></tr></table></div><p>This method first runs a single call to the <a href="#/api/persisters/interfaces/persister/persister/methods/save/save/"><code>save</code></a> method to ensure the data is in sync with the persisted storage. It then continues to watch for changes to the <a href="#/api/store/interfaces/store/store/"><code>Store</code></a>, automatically saving the data to storage.</p><p>This method is asynchronous because it starts by making a single call to the asynchronous <a href="#/api/persisters/interfaces/persister/persister/methods/save/save/"><code>save</code></a> method. Even for those storage types that are synchronous (like browser storage) it is still recommended that you <code>await</code> calls to this method or handle the return type natively as a Promise.</p><section class="s7"><h6>Example</h6><p>This example creates a <a href="#/api/store/interfaces/store/store/"><code>Store</code></a> with some data, and saves into the browser&#x27;s session storage. Subsequent changes to the <a href="#/api/store/interfaces/store/store/"><code>Store</code></a> are then automatically saved to the underlying storage.</p><pre><code><span class="keyword">const</span> store <span class="operator">=</span> <span class="function"><a href="#/api/store/functions/creation/createstore/">createStore</a></span><span class="punctuation">(</span><span class="punctuation">)</span><span class="punctuation">.</span><span class="function"><a href="#/api/store/interfaces/store/store/methods/setter/settables/">setTables</a></span><span class="punctuation">(</span><span class="punctuation">{</span><span class="literal-property">pets</span><span class="operator">:</span> <span class="punctuation">{</span><span class="literal-property">fido</span><span class="operator">:</span> <span class="punctuation">{</span><span class="literal-property">species</span><span class="operator">:</span> <span class="string">'dog'</span><span class="punctuation">}</span><span class="punctuation">}</span><span class="punctuation">}</span><span class="punctuation">)</span><span class="punctuation">;</span>
52885288
<span class="keyword">const</span> persister <span class="operator">=</span> <span class="function"><a href="#/api/persisters/functions/creation/createsessionpersister/">createSessionPersister</a></span><span class="punctuation">(</span>store<span class="punctuation">,</span> <span class="string">'pets'</span><span class="punctuation">)</span><span class="punctuation">;</span>
52895289

52905290
<span class="keyword">await</span> persister<span class="punctuation">.</span><span class="function"><a href="#/api/persisters/interfaces/persister/persister/methods/save/startautosave/">startAutoSave</a></span><span class="punctuation">(</span><span class="punctuation">)</span><span class="punctuation">;</span>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<nav><ul><li><a href="/">TinyBase</a></li><li><a href="/api/">API</a></li><li><a href="/api/persisters/"><code>persisters</code></a></li><li><a href="/api/persisters/interfaces/">Interfaces</a></li><li><a href="/api/persisters/interfaces/persister/persister/"><code>Persister</code></a></li><li><a href="/api/persisters/interfaces/persister/persister/methods/save/">Save methods</a></li></ul></nav><section class="s1" id="/api/persisters/interfaces/persister/persister/methods/save/" data-id="P2/M12/S9"><h1>Save methods</h1><p>This is the collection of save methods within the <a href="/api/persisters/interfaces/persister/persister/"><code>Persister</code></a> interface. There are only three save methods, <a href="/api/persisters/interfaces/persister/persister/methods/save/save/"><code>save</code></a>, <a href="/api/persisters/interfaces/persister/persister/methods/save/startautosave/"><code>startAutoSave</code></a>, and <a href="/api/persisters/interfaces/persister/persister/methods/save/stopautosave/"><code>stopAutoSave</code></a>.</p><section class="s2" id="/api/persisters/interfaces/persister/persister/methods/save/save/" data-id="s2"><h2><a href="/api/persisters/interfaces/persister/persister/methods/save/save/"><code>save</code></a></h2><p>The <code>save</code> method takes data from the <a href="/api/store/interfaces/store/store/"><code>Store</code></a> with which the <a href="/api/persisters/interfaces/persister/persister/"><code>Persister</code></a> is associated and persists it into storage, once.</p></section><section class="s2" id="/api/persisters/interfaces/persister/persister/methods/save/startautosave/" data-id="sAS"><h2><a href="/api/persisters/interfaces/persister/persister/methods/save/startautosave/"><code>startAutoSave</code></a></h2><p>The <a href="/api/persisters/interfaces/persister/persister/methods/save/save/"><code>save</code></a> method takes data from the <a href="/api/store/interfaces/store/store/"><code>Store</code></a> with which the <a href="/api/persisters/interfaces/persister/persister/"><code>Persister</code></a> is associated and persists it into storage, once, and then continuously.</p></section><section class="s2" id="/api/persisters/interfaces/persister/persister/methods/save/stopautosave/" data-id="sAS2"><h2><a href="/api/persisters/interfaces/persister/persister/methods/save/stopautosave/"><code>stopAutoSave</code></a></h2><p>The <code>stopAutoSave</code> method stops the automatic save of data to storage previously started with the <a href="/api/persisters/interfaces/persister/persister/methods/save/startautosave/"><code>startAutoSave</code></a> method.</p></section></section>
1+
<nav><ul><li><a href="/">TinyBase</a></li><li><a href="/api/">API</a></li><li><a href="/api/persisters/"><code>persisters</code></a></li><li><a href="/api/persisters/interfaces/">Interfaces</a></li><li><a href="/api/persisters/interfaces/persister/persister/"><code>Persister</code></a></li><li><a href="/api/persisters/interfaces/persister/persister/methods/save/">Save methods</a></li></ul></nav><section class="s1" id="/api/persisters/interfaces/persister/persister/methods/save/" data-id="P2/M12/S9"><h1>Save methods</h1><p>This is the collection of save methods within the <a href="/api/persisters/interfaces/persister/persister/"><code>Persister</code></a> interface. There are only three save methods, <a href="/api/persisters/interfaces/persister/persister/methods/save/save/"><code>save</code></a>, <a href="/api/persisters/interfaces/persister/persister/methods/save/startautosave/"><code>startAutoSave</code></a>, and <a href="/api/persisters/interfaces/persister/persister/methods/save/stopautosave/"><code>stopAutoSave</code></a>.</p><section class="s2" id="/api/persisters/interfaces/persister/persister/methods/save/save/" data-id="s2"><h2><a href="/api/persisters/interfaces/persister/persister/methods/save/save/"><code>save</code></a></h2><p>The <code>save</code> method takes data from the <a href="/api/store/interfaces/store/store/"><code>Store</code></a> with which the <a href="/api/persisters/interfaces/persister/persister/"><code>Persister</code></a> is associated and persists it into storage, once.</p></section><section class="s2" id="/api/persisters/interfaces/persister/persister/methods/save/startautosave/" data-id="sAS"><h2><a href="/api/persisters/interfaces/persister/persister/methods/save/startautosave/"><code>startAutoSave</code></a></h2><p>The <code>startAutoSave</code> method takes data from the <a href="/api/store/interfaces/store/store/"><code>Store</code></a> with which the <a href="/api/persisters/interfaces/persister/persister/"><code>Persister</code></a> is associated and persists it into storage, once, and then continuously.</p></section><section class="s2" id="/api/persisters/interfaces/persister/persister/methods/save/stopautosave/" data-id="sAS2"><h2><a href="/api/persisters/interfaces/persister/persister/methods/save/stopautosave/"><code>stopAutoSave</code></a></h2><p>The <code>stopAutoSave</code> method stops the automatic save of data to storage previously started with the <a href="/api/persisters/interfaces/persister/persister/methods/save/startautosave/"><code>startAutoSave</code></a> method.</p></section></section>

0 commit comments

Comments
 (0)