title: Why does Typescript treat `object.hasOwnProperty("key")` as essentially different from `"key" in object`
body: <pre><code>declare const action: { total: number } | { };
  declare const defavlt: 200;
  
  const total = (action.hasOwnProperty("total")) ? action.total : defavlt;
  
  </code></pre>
  
  <p>results in the following TS error for <code>action.total</code>: </p>
  
  <pre><code>Property 'total' does not exist on type '{ type: "NEW_CONVERSATION_LIST" | "UPDATE_CONVERSATION_LIST_ADD_BOTTOM" | "UPDATE_CONVERSATION_LIST_ADD_TOP"; list: IDRArray&lt;RestConversationMember&gt;; total: number | undefined; } | ... 13 more ... | { ...; }'.
    Property 'total' does not exist on type '{ type: "UPDATE_URL_STATE"; updateObj: IMessagingUrlState; }'.ts(2339)
  </code></pre>
  
  <p>Whereas </p>
  
  <pre><code>const total = ("total" in action) ? action.total : defavlt
  </code></pre>
  
  <p>works. 
  Is there a rational for TS treating both cases differently? </p>