Skip to main content

Function: defineElement()

function defineElement<V>(input): ElementDefinition;

Defined in: registry.tsx:93

Registers an element type.

The V parameter types the definition site only; the returned ElementDefinition is value-type-erased because components for different value types cannot share one collection under strict function variance, and the registry only ever renders them through FieldApi<unknown>.

Type Parameters

Type ParameterDefault type
Vunknown

Parameters

ParameterType
inputElementDefinitionInput<V>

Returns

ElementDefinition