I am gettings errors everywhere after I migrated to angular 12 from angular 8. By the way I did not get any error when migrating from 8 to 9, neither from 9 to 10, nor from 10 to 11.
Here is an example of error I get:
export interface HistoriqueStatutModel {
userId: string;
date: Date;
statutCible: string;
commentaire?: string;
montantFacture?: number;
}
export interface CommentaireModel {
message: string;
date: Date;
createdBy: string;
}
---
public listeStatut: Array<HistoriqueStatutModel | CommentaireModel>;
---
<li *ngFor="let statut of listeStatut;">
{{statut.message}}
</li>
I get this error:
error TS2339: Property 'message' does not exist on type 'HistoriqueStatutModel | CommentaireModel'.
Property 'message' does not exist on type 'HistoriqueStatutModel'.
{{statut.message}}
Any idea ?