discriminated union
Last updated
Was this helpful?
Last updated
Was this helpful?
Was this helpful?
interface Circle {
kind: "circle"; // common property with literal types
radius: number;
}
interface Square {
kind: "square"; // common property with literal types