Hacker News new | ask | show | jobs
by tengbretson 440 days ago
`if (color === "Red") {`

This counter example against using unions of literals would result in a compiler error ts(2367). Which only furthers the argument for using unions of literals instead.