Quiz · Narrowing · lesson 8 of 12Quiz — a discriminated unionWhat makes a union discriminated, and how do you narrow one?[A]A union is discriminated when its members share no fields at all, so tsc tells them apart by shape alone. You narrow it by reading any property: the read itself shows which member you hold, and the object stays narrowed from that line on.[B]The discriminant must be a string field named type, and narrowing works only inside a switch. In an if tsc compares whole objects, keeps the full union, and the member's own fields stay out of reach in the branch.[C]Every member declares the same field with its own literal type—the discriminant, like kind: "circle" or kind: "square". Checking it in an if or a switch narrows the whole object to one member, with that member's own fields.[D]A check narrows only the discriminant field itself, while the rest of the object keeps the fields of every member at once. That is why reading a field that only one member has still needs ?. inside the branch.← BackDiscriminated unionsNext →Exhaustiveness with never