1// @strict: true 2 3// Repro from #44435 4 5type Correct = { 6 code: string 7 property: true 8 err: undefined 9} 10type Err = { 11 err: `${string} is wrong!` 12} 13type SomeReturnType = Correct | Err; 14 15const example: SomeReturnType = {} as SomeReturnType; 16 17if (example.err === undefined) { 18 example.property; // true 19}