function createComponentBuilder

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

Factory for creating components from API data

Type Parameters

T extends keyof MappedComponentTypes

Parameters

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