resolveA2uiValue
Unpublished development API. This package is under development and is not available as a published release.
Resolves one authored value against a surface's current data model. A
literal is returned as it is, a { path } is read from the data model, a
list is resolved item by item, and a { call, args } runs one of the basic
catalog's functions: formatString, formatNumber, formatCurrency,
formatDate, pluralize, and, or, not, required, regex,
length, numeric and email. Numbers and plurals use the viewer's
locale. An unknown function, or one whose arguments it cannot use, gives
undefined. For a value inside a child template, basePath is its list
item's path (for example /items/0): paths without a leading slash are then
read from that item.
import { resolveA2uiValue } from '@threadplane/content/a2ui';Declaration · overload 1
export declare function resolveA2uiValue(surface: A2uiSurfaceSnapshot, value: A2uiValue, basePath?: string): A2uiValue;Parameters
surface· requiredA2uiSurfaceSnapshotvalue· requiredA2uiValuebasePath· optionalstring
Returns
A2uiValue