title: Reassign param type - typescript
body: <pre><code>type T0 = {
    a: string
    b: string
  }
  type T1 = Omit&lt;T0, 'b'&gt;
  function func({ param }: { param: T0 | T1 }) {
      if (param.hasOwnProperty('b')) { /* reassign type */ }
    return param.b
  }
  </code></pre>
  <p>Is there a possibility to reassign type for <code>param</code> from <code>T0 | T1</code> to <code>T0</code>?</p>