createComponentBuilder

export function createComponentBuilder<T extends keyof MappedComponentBuilderTypes>(
data: APIMessageComponent & { type: T },
): MappedComponentBuilderTypes[T];
export function createComponentBuilder<T extends keyof MappedComponentBuilderTypes>(
data: APIMessageComponent & { type: T },
): MappedComponentBuilderTypes[T];
Transforms API data into a component builder
NameConstraintsOptionalDefaultDescription
Tkeyof MappedComponentBuilderTypesNoNone
NameTypeOptionalDescription
dataAPIMessageComponent & { type: T }NoThe data to create the component from