1 line
9.2 KiB
JavaScript
1 line
9.2 KiB
JavaScript
import{_ as e,c as t,o as a,a as r}from"./app.54d5a277.js";const g='{"title":"Module: game/persistence","description":"","frontmatter":{},"headers":[{"level":2,"title":"Type aliases","slug":"type-aliases"},{"level":3,"title":"Persistent","slug":"persistent"},{"level":3,"title":"PersistentRef","slug":"persistentref"},{"level":3,"title":"State","slug":"state"},{"level":2,"title":"Variables","slug":"variables"},{"level":3,"title":"DefaultValue","slug":"defaultvalue"},{"level":3,"title":"PersistentState","slug":"persistentstate"},{"level":2,"title":"Functions","slug":"functions"},{"level":3,"title":"makePersistent","slug":"makepersistent"},{"level":3,"title":"persistent","slug":"persistent-1"}],"relativePath":"api/modules/game/persistence.md"}',s={},d=r('<h1 id="module-game-persistence" tabindex="-1">Module: game/persistence <a class="header-anchor" href="#module-game-persistence" aria-hidden="true">#</a></h1><h2 id="type-aliases" tabindex="-1">Type aliases <a class="header-anchor" href="#type-aliases" aria-hidden="true">#</a></h2><h3 id="persistent" tabindex="-1">Persistent <a class="header-anchor" href="#persistent" aria-hidden="true">#</a></h3><p>\u01AC <strong>Persistent</strong><<code>T</code>>: <code>Object</code></p><h4 id="type-parameters" tabindex="-1">Type parameters <a class="header-anchor" href="#type-parameters" aria-hidden="true">#</a></h4><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th></tr></thead><tbody><tr><td style="text-align:left;"><code>T</code></td><td style="text-align:left;">extends <a href="./persistence.html#state"><code>State</code></a> = <a href="./persistence.html#state"><code>State</code></a></td></tr></tbody></table><h4 id="type-declaration" tabindex="-1">Type declaration <a class="header-anchor" href="#type-declaration" aria-hidden="true">#</a></h4><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th></tr></thead><tbody><tr><td style="text-align:left;"><code>[DefaultValue]</code></td><td style="text-align:left;"><code>T</code></td></tr><tr><td style="text-align:left;"><code>[PersistentState]</code></td><td style="text-align:left;"><code>Ref</code><<code>T</code>></td></tr></tbody></table><h4 id="defined-in" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in" aria-hidden="true">#</a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/305946e/src/game/persistence.ts#L23" target="_blank" rel="noopener noreferrer">profectus/src/game/persistence.ts:23</a></p><hr><h3 id="persistentref" tabindex="-1">PersistentRef <a class="header-anchor" href="#persistentref" aria-hidden="true">#</a></h3><p>\u01AC <strong>PersistentRef</strong><<code>T</code>>: <code>Ref</code><<code>T</code>> & <a href="./persistence.html#persistent"><code>Persistent</code></a><<code>T</code>></p><h4 id="type-parameters-1" tabindex="-1">Type parameters <a class="header-anchor" href="#type-parameters-1" aria-hidden="true">#</a></h4><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th></tr></thead><tbody><tr><td style="text-align:left;"><code>T</code></td><td style="text-align:left;">extends <a href="./persistence.html#state"><code>State</code></a> = <a href="./persistence.html#state"><code>State</code></a></td></tr></tbody></table><h4 id="defined-in-1" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-1" aria-hidden="true">#</a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/305946e/src/game/persistence.ts#L27" target="_blank" rel="noopener noreferrer">profectus/src/game/persistence.ts:27</a></p><hr><h3 id="state" tabindex="-1">State <a class="header-anchor" href="#state" aria-hidden="true">#</a></h3><p>\u01AC <strong>State</strong>: <code>string</code> | <code>number</code> | <code>boolean</code> | <a href="./../util/bignum.html#decimalsource"><code>DecimalSource</code></a> | { <code>[key: string]</code>: <a href="./persistence.html#state"><code>State</code></a>; } | { <code>[key: number]</code>: <a href="./persistence.html#state"><code>State</code></a>; }</p><h4 id="defined-in-2" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-2" aria-hidden="true">#</a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/305946e/src/game/persistence.ts#L15" target="_blank" rel="noopener noreferrer">profectus/src/game/persistence.ts:15</a></p><h2 id="variables" tabindex="-1">Variables <a class="header-anchor" href="#variables" aria-hidden="true">#</a></h2><h3 id="defaultvalue" tabindex="-1">DefaultValue <a class="header-anchor" href="#defaultvalue" aria-hidden="true">#</a></h3><p>\u2022 <code>Const</code> <strong>DefaultValue</strong>: typeof <a href="./persistence.html#defaultvalue"><code>DefaultValue</code></a></p><h4 id="defined-in-3" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-3" aria-hidden="true">#</a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/305946e/src/game/persistence.ts#L9" target="_blank" rel="noopener noreferrer">profectus/src/game/persistence.ts:9</a></p><hr><h3 id="persistentstate" tabindex="-1">PersistentState <a class="header-anchor" href="#persistentstate" aria-hidden="true">#</a></h3><p>\u2022 <code>Const</code> <strong>PersistentState</strong>: typeof <a href="./persistence.html#persistentstate"><code>PersistentState</code></a></p><h4 id="defined-in-4" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-4" aria-hidden="true">#</a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/305946e/src/game/persistence.ts#L8" target="_blank" rel="noopener noreferrer">profectus/src/game/persistence.ts:8</a></p><h2 id="functions" tabindex="-1">Functions <a class="header-anchor" href="#functions" aria-hidden="true">#</a></h2><h3 id="makepersistent" tabindex="-1">makePersistent <a class="header-anchor" href="#makepersistent" aria-hidden="true">#</a></h3><p>\u25B8 <strong>makePersistent</strong><<code>T</code>>(<code>obj</code>, <code>defaultValue</code>): asserts <code>obj</code> is <a href="./persistence.html#persistent"><code>Persistent</code></a><<code>T</code>></p><h4 id="type-parameters-2" tabindex="-1">Type parameters <a class="header-anchor" href="#type-parameters-2" aria-hidden="true">#</a></h4><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th></tr></thead><tbody><tr><td style="text-align:left;"><code>T</code></td><td style="text-align:left;">extends <a href="./persistence.html#state"><code>State</code></a></td></tr></tbody></table><h4 id="parameters" tabindex="-1">Parameters <a class="header-anchor" href="#parameters" aria-hidden="true">#</a></h4><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th></tr></thead><tbody><tr><td style="text-align:left;"><code>obj</code></td><td style="text-align:left;"><code>unknown</code></td></tr><tr><td style="text-align:left;"><code>defaultValue</code></td><td style="text-align:left;"><code>T</code></td></tr></tbody></table><h4 id="returns" tabindex="-1">Returns <a class="header-anchor" href="#returns" aria-hidden="true">#</a></h4><p>asserts <code>obj</code> is <a href="./persistence.html#persistent"><code>Persistent</code></a><<code>T</code>></p><h4 id="defined-in-5" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-5" aria-hidden="true">#</a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/305946e/src/game/persistence.ts#L39" target="_blank" rel="noopener noreferrer">profectus/src/game/persistence.ts:39</a></p><hr><h3 id="persistent-1" tabindex="-1">persistent <a class="header-anchor" href="#persistent-1" aria-hidden="true">#</a></h3><p>\u25B8 <strong>persistent</strong><<code>T</code>>(<code>defaultValue</code>): <a href="./persistence.html#persistentref"><code>PersistentRef</code></a><<code>T</code>></p><h4 id="type-parameters-3" tabindex="-1">Type parameters <a class="header-anchor" href="#type-parameters-3" aria-hidden="true">#</a></h4><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th></tr></thead><tbody><tr><td style="text-align:left;"><code>T</code></td><td style="text-align:left;">extends <a href="./persistence.html#state"><code>State</code></a></td></tr></tbody></table><h4 id="parameters-1" tabindex="-1">Parameters <a class="header-anchor" href="#parameters-1" aria-hidden="true">#</a></h4><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th></tr></thead><tbody><tr><td style="text-align:left;"><code>defaultValue</code></td><td style="text-align:left;"><code>T</code> | <code>Ref</code><<code>T</code>></td></tr></tbody></table><h4 id="returns-1" tabindex="-1">Returns <a class="header-anchor" href="#returns-1" aria-hidden="true">#</a></h4><p><a href="./persistence.html#persistentref"><code>PersistentRef</code></a><<code>T</code>></p><h4 id="defined-in-6" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-6" aria-hidden="true">#</a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/305946e/src/game/persistence.ts#L29" target="_blank" rel="noopener noreferrer">profectus/src/game/persistence.ts:29</a></p>',54),n=[d];function i(l,c,o,h,p,f){return a(),t("div",null,n)}var b=e(s,[["render",i]]);export{g as __pageData,b as default};
|