const value = Math.random() < 0.5 ? "a" : "b";
if (value !== "a") {
// ...
} else if (value === "b") {
This condition will always return 'false' since the types '"a"' and '"b"' have no overlap.
// Oops, unreachable
}
Found this code in a tutorial. I want to understand the meaning of this error: "types '"a"' and '"b"' have no overlap."
What are they talking about?