What happens when you Omit a key from a discriminated union?
Name the type the ^? line points at, and every error TypeScript reports.
type Shape = | { kind: "circle"; radius: number; id: string } | { kind: "square"; size: number; id: string }; type NewShape = Omit<Shape, "id">;// ^? const circle: NewShape = { kind: "circle", radius: 10 };Work it out first: the compiler shows every error and type.
The answer
Work out every error TypeScript reports and every type it shows, line by line. Then check.
Checking your sign-in…