Why does TypeScript reject the read of `s.value` inside the `if`, even though both narrowed members have a `value` property?
type Box =
| { tag: "num"; value: number }
| { tag: "str"; value: string }
| { tag: "none" };
function read(s: Box) {
if (s.tag !== "none") {
return s.value.toFixed(2);
}
}