createComponent

export function createComponent<Type extends keyof MappedComponentTypes>( data: APIMessageComponent & { type: Type },): MappedComponentTypes[Type];
export function createComponent<Type extends keyof MappedComponentTypes>( data: APIMessageComponent & { type: Type },): MappedComponentTypes[Type];
Transforms API data into a component
NameConstraintsOptionalDefaultDescription
Typekeyof MappedComponentTypesNoNone
NameTypeOptionalDescription
dataAPIMessageComponent & { type: Type }NoThe data to create the component from