interface Utilisateur { nom: string; age: number; } function afficherUtilisateur(u: Utilisateur): void { console.log(`${u.nom} a ${u.age} ans`); } afficherUtilisateur({ nom: "Alice", age: 25 }); // L'argument de type '{ nom: string; }' n'est pas attribuable // au paramètre de type 'Utilisateur'. // La propriété 'age' est absente du type '{ nom: string; }' // mais obligatoire dans le type 'Utilisateur'.ts(2345) afficherUtilisateur({ nom: "Bob" });