Skip to content

TypeRef

Import from @varavel/vdl-plugin-sdk.

type TypeRef = object;

Normalized type reference used by fields.

kind selects which payload fields are meaningful. Generators should inspect kind first, then read the related payload fields.

Properties

Property Type Description
arrayDims? number Array rank when kind is array (for example, 2 for T[][])
arrayType? TypeRef Element type when kind is array
enumName? string Referenced enum name when kind is enum
enumType? EnumValueType Referenced enum underlying kind when kind is enum
kind TypeKind Type category discriminator
mapType? TypeRef Map value type when kind is map
objectFields? Field[] Inline object fields when kind is object
primitiveName? PrimitiveType Primitive type name when kind is primitive
typeName? string Referenced type name when kind is type