title: Typescript checking for truthy value
body: <p>I am fetching data in typescript and have the following types:</p>
  <pre><code>type GoodResponse = {
    status: 1;
    data: string;
  }
  
  type BadResponse = {
    status: 0;
    error: string;
  }
  
  type Response = GoodResponse | BadResponse
  </code></pre>
  <p>Now after fetching data, I try to check response like this:</p>
  <pre><code>const response = await fetchApi() // returns type Response
  if (!response.status) return
  
  const data = response.data
  // Property 'data' does not exist on type 'Good Response | Bad Response.....
  </code></pre>
  <p>However if check for <code>response.status === 0</code> it works properly.</p>