Overload 1
Overload 2
Overload 3
export function createComponent<Type extends keyof MappedComponentTypes>( data: APIMessageComponent & { type: Type },): MappedComponentTypes[Type];
Transforms API data into a component
Type Parameters
keyof MappedComponentTypes Type extends
Parameters
APIMessageComponent & { type: Type } data:
The data to create the component from