Skip to main content

core.isreference

Home > @medplum/core > isReference

isReference() function

Typeguard to validate that an object is a FHIR resource

Signature:

export declare function isReference(value: unknown): value is Reference & {
reference: string;
};

Parameters

Parameter

Type

Description

value

unknown

The object to check

Returns:

value is Reference & { reference: string; }

True if the input is of type 'object' and contains property 'reference'