Search...

createComponentBuilder

export declare function createComponentBuilder<T extends keyof MappedComponentTypes>(data: (APIMessageComponent | APIModalComponent) & {
    type: T;
}): MappedComponentTypes[T];
export declare function createComponentBuilder<T extends keyof MappedComponentTypes>(data: (APIMessageComponent | APIModalComponent) & {
    type: T;
}): MappedComponentTypes[T];
Factory for creating components from API data
NameConstraintsOptionalDefaultDescription
Tkeyof MappedComponentTypesNoNone
NameTypeOptionalDescription
data(APIMessageComponent | APIModalComponent) & { type: T; }NoThe api data to transform to a component class