What does TypeScript report for these conflicting extends and & declarations?
Name the type each ^? line points at, and every error TypeScript reports.
interface Base { id: string; role: "user" | "admin";} interface Admin extends Base { role: "admin";}interface Broken extends Base { id: number;} type Mixed = Base & { id: number };type MixedId = Mixed["id"];// ^?type Clash = { role: "user" } & { role: "admin" };// ^? const mixed: Mixed = { id: 1, role: "user" };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…