Skip to main content

core.getelementdefinitionfromelements

Home > @medplum/core > getElementDefinitionFromElements

getElementDefinitionFromElements() function

Returns an element definition from mapping of elements by property name.

Signature:

export declare function getElementDefinitionFromElements(elements: InternalTypeSchema['elements'], propertyName: string): InternalSchemaElement | undefined;

Parameters

ParameterTypeDescription
elementsInternalTypeSchema['elements']A mapping of property names to element definitions
propertyNamestringThe property name of interest

Returns:

InternalSchemaElement | undefined

The element definition if found.