Skip to main content

core.isresource

Home > @medplum/core > isResource

isResource() function

Typeguard to validate that an object is a FHIR resource

Signature:

export declare function isResource(value: unknown): value is Resource;

Parameters

ParameterTypeDescription
valueunknownThe object to check

Returns:

value is Resource

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