as the
tableDataSource: MatTableDataSource<ToDoInterface>;
does not type the model,
this:
<ng-container matColumnDef="toDo">
<th mat-header-cell *matHeaderCellDef mat-sort-header>ToDo</th>
<td mat-cell *matCellDef="let model">
<ng-container *ngIf="assertItemType(model) as toDoModel">
{{toDoModel.toDo}}
</ng-container>
</td>
</ng-container>
where:
assertItemType(item: ToDoInterface): ToDoInterface {
return item;
}
works.
but not sure if it the best way to do it