Skip to content

getVariantKey

getVariantKey<T>(variant): CandidVariantKey<T>

Defined in: utils/candid.ts:71

Extracts the key from a Candid variant type. Variants in Candid are represented as objects with a single key-value pair.

T extends Record<string, any>

T

The variant object

CandidVariantKey<T>

The key of the variant