Skip to main content

core.istextobject

Home > @medplum/core > isTextObject

isTextObject() function

Returns true if the input value is an object with a string text property. This is a heuristic check based on the presence of the "text" property.

Signature:

export declare function isTextObject(value: unknown): value is {
text: string;
};

Parameters

Parameter

Type

Description

value

unknown

The candidate value.

Returns:

value is { text: string; }

True if the input value is a text object.