In this example, I am demonstrating TypeScript interfaces in a simple way:
interface A: {
id: number;
email: string;
}
interface B extends A {
login: string;
password: string;
}
My goal is to have certain requirements when creating objects from these interfaces. For interface A, all properties are required. For interface B, the 'email' property from A should be optional while all other properties in B are required. Can this be achieved?