getVariantValue
getVariantValue<
T,K>(variant):CandidVariantValue<T,K>
Defined in: utils/candid.ts:88
Extracts the value from a Candid variant type.
Type Parameters
Section titled “Type Parameters”T extends Record<string, any>
K extends string = CandidVariantKey<T>
Parameters
Section titled “Parameters”variant
Section titled “variant”T
The variant object
Returns
Section titled “Returns”CandidVariantValue<T, K>
The value associated with the variant’s key