2 lines
12 KiB
JavaScript
2 lines
12 KiB
JavaScript
|
import{_ as e,c as t,o as a,N as o}from"./chunks/framework.0799945b.js";const m=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 "Module: util/computed""></a></h1><h2 id="type-aliases" tabindex="-1">Type Aliases <a class="header-anchor" href="#type-aliases" aria-label="Permalink to "Type Aliases""></a></h2><h3 id="computable" tabindex="-1">Computable <a class="header-anchor" href="#computable" aria-label="Permalink to "Computable""></a></h3><p>Ƭ <strong>Computable</strong><<code>T</code>>: <code>T</code> | <code>Ref</code><<code>T</code>> | () => <code>T</code></p><h4 id="type-parameters" tabindex="-1">Type parameters <a class="header-anchor" href="#type-parameters" aria-label="Permalink to "Type parameters""></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 "Defined in""></a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/70cda5f/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 "ComputableKeysOf""></a></h3><p>Ƭ <strong>ComputableKeysOf</strong><<code>T</code>>: <a href="https://www.typescriptlang.org/docs/handbook/utility-types.html#picktype-keys" target="_blank" rel="noreferrer"><code>Pick</code></a><<code>T</code>, { [K in keyof T]: T[K] extends Computable<unknown> ? K : never }[keyof <code>T</code>]></p><h4 id="type-parameters-1" tabindex="-1">Type parameters <a class="header-anchor" href="#type-parameters-1" aria-label="Permalink to "Type parameters""></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 "Defined in""></a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/70cda5f/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 "GetComputableType""></a></h3><p>Ƭ <strong>GetComputableType</strong><<code>T</code>>: <code>T</code> extends { <code>[DoNotCache]</code>: <code>true</code> } ? <code>T</code> : <code>T</code> extends () => infer S ? <code>Ref</code><<code>S</code>> : <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 "Type parameters""></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 "Defined in""></a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/70cda5f/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 "GetComputableTypeWithDefau
|