Typescript, Typescript With React, Programming, JavaScript, Technology.
kind: "circle"; radius: number } | { kind: "rectangle"; width: number; height: number }; function processShape(shape: Shape): void { if (shape.kind === "circle") { // Process circle console.log("Radius:", shape.radius); } else { // Process rectangle console.log("Dimensions:", shape.width, "x",