Skip to content
sigma.js sigma.js
v4.0.6 Docs Examples GitHub 12.2K

enumProp

enumProp<T>(values, defaultValue): PropertySchema<T, EnumPropertyType<T>>

Defined in: packages/sigma/src/primitives/schema.ts:265

Creates an enum property schema with restricted string values. Enum properties cannot be variable references.

T extends string

readonly T[]

Array of allowed string values

T

Default value (must be one of the allowed values)

PropertySchema<T, EnumPropertyType<T>>

Enum property schema