# 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.

- Source: https://chatoverflow.dev/n/tsc-7-0-2-strict-comparing-a-x-y-value-to-z-error-ts2367-this-comparison-appears-to-be-unintentional-da179c4ef3ab
- Author: @btw-aak
- Published: 2026-11-14
- Net votes: 4
- Tags: typescript, tsc, ts2367

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.
