profectus-docs/assets/api_modules_util_computed.md.754b4330.js

2 lines
12 KiB
JavaScript
Raw Normal View History

import{_ as e,c as t,o as a,a as d}from"./app.54d5a277.js";const f='{"title":"Module: util/computed","description":"","frontmatter":{},"headers":[{"level":2,"title":"Type aliases","slug":"type-aliases"},{"level":3,"title":"Computable","slug":"computable"},{"level":3,"title":"ComputableKeysOf","slug":"computablekeysof"},{"level":3,"title":"GetComputableType","slug":"getcomputabletype"},{"level":3,"title":"GetComputableTypeWithDefault","slug":"getcomputabletypewithdefault"},{"level":3,"title":"ProcessedComputable","slug":"processedcomputable"},{"level":3,"title":"UnwrapComputableType","slug":"unwrapcomputabletype"},{"level":2,"title":"Variables","slug":"variables"},{"level":3,"title":"DoNotCache","slug":"donotcache"},{"level":2,"title":"Functions","slug":"functions"},{"level":3,"title":"convertComputable","slug":"convertcomputable"},{"level":3,"title":"processComputable","slug":"processcomputable"}],"relativePath":"api/modules/util/computed.md"}',o={},r=d('<h1 id="module-util-computed" tabindex="-1">Module: util/computed <a class="header-anchor" href="#module-util-computed" 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="computable" tabindex="-1">Computable <a class="header-anchor" href="#computable" aria-hidden="true">#</a></h3><p>\u01AC <strong>Computable</strong>&lt;<code>T</code>&gt;: <code>T</code> | <code>Ref</code>&lt;<code>T</code>&gt; | () =&gt; <code>T</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></tr></thead><tbody><tr><td style="text-align:left;"><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/util/computed.ts#L6" target="_blank" rel="noopener noreferrer">profectus/src/util/computed.ts:6</a></p><hr><h3 id="computablekeysof" tabindex="-1">ComputableKeysOf <a class="header-anchor" href="#computablekeysof" aria-hidden="true">#</a></h3><p>\u01AC <strong>ComputableKeysOf</strong>&lt;<code>T</code>&gt;: <code>Pick</code>&lt;<code>T</code>, { [<code>K</code> in keyof <code>T</code>]: <code>T</code>[<code>K</code>] extends <a href="./computed.html#computable"><code>Computable</code></a>&lt;<code>unknown</code>&gt; ? <code>K</code> : <code>never</code> }[keyof <code>T</code>]&gt;</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></tr></thead><tbody><tr><td style="text-align:left;"><code>T</code></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/util/computed.ts#L20" target="_blank" rel="noopener noreferrer">profectus/src/util/computed.ts:20</a></p><hr><h3 id="getcomputabletype" tabindex="-1">GetComputableType <a class="header-anchor" href="#getcomputabletype" aria-hidden="true">#</a></h3><p>\u01AC <strong>GetComputableType</strong>&lt;<code>T</code>&gt;: <code>T</code> extends { <code>[DoNotCache]</code>: <code>true</code> } ? <code>T</code> : <code>T</code> extends () =&gt; infer S ? <code>Ref</code>&lt;<code>S</code>&gt; : <code>undefined</code> extends <code>T</code> ? <code>undefined</code> : <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></tr></thead><tbody><tr><td style="text-align:left;"><code>T</code></td></tr></tbody></table><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/Pr