Skip to content

PropertyValue

PropertyValue = BooleanPropertyValue | IdPropertyValue | IntegerPropertyValue | JsonPropertyValue | MultiSelectPropertyValue | NumberPropertyValue | SingleSelectPropertyValue | StringPropertyValue | InstantPropertyValue | DateTimePropertyValue | DurationPropertyValue | DatePropertyValue | TimePropertyValue | InvalidPropertyValue

Represents one Property value tagged with its data type, as found in PropertyValueMap.

Discriminate on type to narrow to the concrete value shape. An invalid entry means a value is stored but cannot be read as the Property’s type; an absent key means the value is unset or not granted.

Read a typed value

const title = item.propertyValues.title;
if (title?.type === 'string') return title.value;