withViews
Adds views to a registry without overwriting existing entries.
New keys are added; keys that already exist in base are preserved.
import { withViews } from '@threadplane/chat';Declaration · overload 1
export declare function withViews(base: ViewRegistry, additions: Record<string, Type<unknown> | RenderViewEntry>): ViewRegistry;Parameters
base· requiredViewRegistryadditions· requiredRecord<string, Type<unknown> | RenderViewEntry>
Returns
ViewRegistryExamples
const extended = withViews(a2uiBasicCatalog(), { MyWidget: MyWidgetComponent });