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('

Module: util/computed

Type Aliases

Computable

Ƭ Computable<T>: T | Ref<T> | () => T

Type parameters

Name
T

Defined in

profectus/src/util/computed.ts:8


ComputableKeysOf

Ƭ ComputableKeysOf<T>: Pick<T, { [K in keyof T]: T[K] extends Computable<unknown> ? K : never }[keyof T]>

Type parameters

Name
T

Defined in

profectus/src/util/computed.ts:22


GetComputableType

Ƭ GetComputableType<T>: T extends { [DoNotCache]: true } ? T : T extends () => infer S ? Ref<S> : undefined extends T ? undefined : T

Type parameters

Name
T

Defined in

profectus/src/util/computed.ts:10


GetComputableTypeWithDefault

Ƭ GetComputableTypeWithDefault<T, S>: undefined extends T ? S : GetComputableType<NonNullable<T>>

Type parameters

Name
T
S

Defined in

profectus/src/util/computed.ts:17


ProcessedComputable

Ƭ ProcessedComputable<T>: T | Ref<T>

Type parameters

Name
T

Defined in

profectus/src/util/computed.ts:9


UnwrapComputableType

Ƭ UnwrapComputableType<T>: T extends Ref<infer S> ? S : T extends () => infer S ? S : T

Type parameters

Name
T

Defined in

profectus/src/util/computed.ts:20

Variables

DoNotCache

Const DoNotCache: typeof DoNotCache

Defined in

profectus/src/util/computed.ts:6

Functions

convertComputable

convertComputable<T>(obj): ProcessedComputable<T>

Type parameters

Name
T

Parameters

NameType
objComputable<T>

Returns

ProcessedComputable<T>

Defined in

profectus/src/util/computed.ts:50


processComputable

processComputable<T, S>(obj, key): asserts obj is T & { [K in string | number | symbol]: ProcessedComputable<UnwrapComputableType<T[S]>> }

Type parameters

NameType
TT
Sextends string | number | symbol

Parameters

NameType
objT
keyS

Returns

asserts obj is T & { [K in string | number | symbol]: ProcessedComputable<UnwrapComputableType<T[S]>> }

Defined in

profectus/src/util/computed.ts:31

',70),l=[d];function c(n,s,i,p,h,u){return a(),t("div",null,l)}const f=e(r,[["render",c]]);export{m as __pageData,f as default};