My goal is to construct a custom table using Angular, where I aim to define a TableItem
type that enforces the presence of a label
property for every item added to the table.
For instance, consider this example:
<app-my-table [items]="items"></app-my-table>
In this scenario, any object assigned to items
must include a label
property.
I am struggling to develop an effective approach to achieve this requirement.