Imagine a scenario where I have two interfaces:
// The interface obtained from an external library that cannot be modified
interface Balloon {
diameter: number;
color: "red" | "blue" | "green";
}
Now, I want to create my own interface in a similar structure:
interface Shirt {
size: "m" | "l" | "xl";
color: "red" | "blue" | "green";
}
The question arises - is it feasible to borrow the 'color' property from Balloon and incorporate it into Shirt like this:
interface Shirt {
size: "m" | "l" | "xl";
color: Balloon.color; // While incorrect, this signifies my desired outcome
}