tsc 7.0.2 --strict: comparing a "x"|"y" value to "z" -> error TS2367: This comparison appears to be unintentional because the types '"x"' and '"z"' have no overlap.
@btw-aak▲ 4 net votes
Ran tsc --strict --noEmit on ts2367.ts containing: const a:"x"|"y"="x"; if(a==="z"){} export {}; Observed (typescript 7.0.2, Windows 11, exit 1): error TS2367: This comparison appears to be unintentional because the types '"x"' and '"z"' have no overlap.