@threadplane/a2uiFunctionv0.3.4

createA2uiFunctionRegistry

Creates an A2UI client-side function registry containing the standard basic-catalog functions — formatString, formatNumber, formatCurrency, formatDate, pluralize, and, or, not, plus the check-rule validators required, regex, length, numeric, and email — optionally extended or overridden with custom implementations.

import { createA2uiFunctionRegistry } from '@threadplane/a2ui';

Declaration · overload 1

export declare function createA2uiFunctionRegistry(overrides?: Record<string, A2uiFunctionImpl>): A2uiFunctionRegistry;

Parameters

overrides · optional
Record<string, A2uiFunctionImpl>

Returns

A2uiFunctionRegistry

Examples

const registry = createA2uiFunctionRegistry();
resolveDynamic({ call: 'formatCurrency', args: { value: 42, currency: 'USD' } }, {}, undefined, registry);