profectus-docs/assets/api_modules_util_computed.md.88db1dec.js

2 lines
10 KiB
JavaScript
Raw Normal View History

import{_ as e,c as t,o as a,N as o}from"./chunks/framework.0799945b.js";const f=JSON.parse('{"title":"Module: util/computed","description":"","frontmatter":{"editLink":false},"headers":[],"relativePath":"api/modules/util/computed.md","lastUpdated":null}'),r={name:"api/modules/util/computed.md"},d=o('<h1 id="module-util-computed" tabindex="-1">Module: util/computed <a class="header-anchor" href="#module-util-computed" aria-label="Permalink to &quot;Module: util/computed&quot;"></a></h1><h2 id="type-aliases" tabindex="-1">Type Aliases <a class="header-anchor" href="#type-aliases" aria-label="Permalink to &quot;Type Aliases&quot;"></a></h2><h3 id="computable" tabindex="-1">Computable <a class="header-anchor" href="#computable" aria-label="Permalink to &quot;Computable&quot;"></a></h3><p>Ƭ <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-label="Permalink to &quot;Type parameters&quot;"></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-label="Permalink to &quot;Defined in&quot;"></a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/b666e0c/src/util/computed.ts#L8" target="_blank" rel="noreferrer">profectus/src/util/computed.ts:8</a></p><hr><h3 id="computablekeysof" tabindex="-1">ComputableKeysOf <a class="header-anchor" href="#computablekeysof" aria-label="Permalink to &quot;ComputableKeysOf&quot;"></a></h3><p>Ƭ <strong>ComputableKeysOf</strong>&lt;<code>T</code>&gt;: <a href="https://www.typescriptlang.org/docs/handbook/utility-types.html#picktype-keys" target="_blank" rel="noreferrer"><code>Pick</code></a>&lt;<code>T</code>, { [K in keyof T]: T[K] extends Computable&lt;unknown&gt; ? K : never }[keyof <code>T</code>]&gt;</p><h4 id="type-parameters-1" tabindex="-1">Type parameters <a class="header-anchor" href="#type-parameters-1" aria-label="Permalink to &quot;Type parameters&quot;"></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-label="Permalink to &quot;Defined in&quot;"></a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/b666e0c/src/util/computed.ts#L22" target="_blank" rel="noreferrer">profectus/src/util/computed.ts:22</a></p><hr><h3 id="getcomputabletype" tabindex="-1">GetComputableType <a class="header-anchor" href="#getcomputabletype" aria-label="Permalink to &quot;GetComputableType&quot;"></a></h3><p>Ƭ <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-label="Permalink to &quot;Type parameters&quot;"></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-label="Permalink to &quot;Defined in&quot;"></a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/b666e0c/src/util/computed.ts#L10" target="_blank" rel="noreferrer">profectus/src/util/computed.ts:10</a></p><hr><h3 id="getcomputabletypewithdefault" tabindex="-1">GetComputableTypeWithDefault <a class="header-anchor" href="#getcomputabletypewithdefault" aria-label="Permalink to &quot;GetComputableTypeWithDefau