import{_ as e,c as t,o as a,a as d}from"./app.ab34650d.js";const m=JSON.parse('{"title":"Module: util/computed","description":"","frontmatter":{"editLink":false},"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","lastUpdated":null}'),o={name:"api/modules/util/computed.md"},r=d('

Module: util/computed

Type Aliases

Computable

\u01AC Computable<T>: T | Ref<T> | () => T

Type parameters

Name
T

Defined in

profectus/src/util/computed.ts:7


ComputableKeysOf

\u01AC 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:21


GetComputableType

\u01AC 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:9


GetComputableTypeWithDefault

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

Type parameters

Name
T
S

Defined in

profectus/src/util/computed.ts:16


ProcessedComputable

\u01AC ProcessedComputable<T>: T | Ref<T>

Type parameters

Name
T

Defined in

profectus/src/util/computed.ts:8


UnwrapComputableType

\u01AC 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:19

Variables

DoNotCache

\u2022 Const DoNotCache: typeof DoNotCache

Defined in

profectus/src/util/computed.ts:5

Functions

convertComputable

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

Type parameters

Name
T

Parameters

NameType
objComputable<T>

Returns

ProcessedComputable<T>


processComputable

\u25B8 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]>> }

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