I'm at my wits end with this. It seems like it should work, I've been wrestling with it for hours, but I'm not sure what's wrong. This is the smallest example I could come up with. I even have a type guard.
/** @typedef {{ a: string }} TypeA*/
/** @typedef {{ b: string }} TypeB*/
/** @typedef {(TypeA | TypeB) } TypeC */
/** @type {TypeC} */
let typeC;
console.log(typeC.b) // autocompletion for property b doesn't work
I get the error:
Property 'b' does not exist on type '{ a: string; } | { b: string; }'.
Property 'b' does not exist on type '{ a: string; }'.ts(2339)
