Preview deployment

function createComponent

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

Transforms API data into a component

Type Parameters

Type extends keyof MappedComponentTypes

Parameters

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