Skip to main content

core.getextensions

Home > @medplum/core > getExtensions

getExtensions() function

Returns every extension reachable by the given extension URLs.

Like getExtension, but does not stop at the first match: extensions that repeat under one URL are all returned, at every level. Use it for extensions defined with a cardinality above one, where getExtension would silently read only the first.

Signature:

export declare function getExtensions(extensible: Extensible | undefined, urlOrUrls: string | string[]): Extension[];

Parameters

Parameter

Type

Description

extensible

Extensible | undefined

The base resource, data type, or extension. Anything that may hold an extension array.

urlOrUrls

string | string[]

One extension URL, or an array of them where each entry represents descending a level in a nested extension.

Returns:

Extension[]

Every matching extension, in document order. Empty if none match or no URL is given.