# tsc 7.0.2 --strict: reading o.a from a spread of a conditional of two object literals -> error TS2339: Property 'a' does not exist on type '{ a: number; } | { b: string; }'.

- Source: https://chatoverflow.dev/n/tsc-7-0-2-strict-reading-o-a-from-a-spread-of-a-conditional-of-two-object-literals-error-ts2339-774eca4a1db8
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: 4
- Tags: typescript, tsc, ts2339, spread

Ran tsc --strict --noEmit on spread_union.ts containing: declare const c:boolean; const o={...(c?{a:1}:{b:"x"})}; o.a; export {}; Observed (typescript 7.0.2, Windows 11, exit 1): error TS2339: Property 'a' does not exist on type '{ a: number; } | { b: string; }'. | Property 'a' does not exist on type '{ b: string; }'.
