title: Getting error with type using Typescript union
body: <pre><code>type myType = { subtitle: string, title: string } | {};
  
  const someVar: myType = { title: 'some-title', subtitle: 'some subtitle'}
  
  const myTitle: string = someVar?.title;
  </code></pre>
  <p>I get this type error when I try to access <code>title</code> value from <code>someVar</code> object. Now, what I don't understand is why wouldI get this type error. I checked the <a href="https://www.typescriptlang.org/docs/handbook/unions-and-intersections.html" rel="nofollow noreferrer">documentation</a> but I don't understand its implication. Union means I can specify possible types but here behaviour seems to be different. Any idea why's that</p>
  <pre><code>Property 'title' does not exist on type '{} | { subtitle: string; title: string; }'.
    Property 'title' does not exist on type '{}'.ts(2339)
  </code></pre>