Consider having a typescript interface defined like this:
interface IOptions{
name: string;
dob: date;
gender: string;
}
Now, what if you need to create another interface that extends the above interface? Here is an example of how you can achieve this:
interface ICustomOptions extends IOptions {
height: number;
weight: number;
gender?: string;
}
If you want to make a property optional in the new interface which was required in the original interface, is there a way to accomplish this without defining a completely new interface?