Skip to content

classifyVariantValueKind

classifyVariantValueKind(value): "null" | VariantMemberKind

Defined in: packages/core/src/fields/variant/utils.ts:87

Classifies a primitive variant()’s STORED VALUE at runtime — the active-member lookup the admin form (on load) uses, and the same lookup documents/cloneDocumentForDuplicate.ts and fields/blocks/utils.ts use to recover which member a stored value belongs to before cloning/seeding it fresh. A nullish value is its own kind (a nullable member’s cleared value), never collapsed into one of the data kinds.

unknown

The field’s current stored/form value.

"null" | VariantMemberKind

One of VARIANT_MEMBER_KINDS, or "null" for a nullish value.