cf.completefrontend

Predict the typesHard

What happens when you Omit a key from a discriminated union?

Name the type the ^? line points at, and every error TypeScript reports.

What does TypeScript report here?
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…