function createComponentBuilder

export function createComponentBuilder<Type extends keyof MappedComponentBuilderTypes>( data: APIMessageComponent & { type: Type },): MappedComponentBuilderTypes[Type];

Transforms API data into a component builder

Type Parameters

Type extends keyof MappedComponentBuilderTypes

Parameters

data: APIMessageComponent & { type: Type }
The data to create the component from