function createComponentBuilder

export declare function createComponentBuilder<ComponentType extends keyof MappedComponentTypes>(data: (APIModalComponent | APIMessageComponent) & {   type: ComponentType;
}): MappedComponentTypes[ComponentType];

Factory for creating components from API data.

Type Parameters

ComponentType extends keyof MappedComponentTypes

The type of component to use

Parameters

data: (APIModalComponent | APIMessageComponent) & { type: ComponentType; }
The API data to transform to a component class