One interface can extend another to add more fields. An optional field may be missing, so your code should handle both cases. You will build a small contact shape and decide if we can send email.
interface Named {
name: string;
}
interface WithPhone extends Named {
phone?: string;
}
Write a pure function: look at the input and return a result without changing the input.
Decide if a contact can be emailed.