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

Parameter

Type

Description

elements

InternalTypeSchema['elements']

A mapping of property names to element definitions

propertyName

string

The property name of interest

Returns:

InternalSchemaElement | undefined

The element definition if found.