title: How to merge properties of two types with properties overlap?
body: <p>Input: two types, output: third type that has properties of first type overlaped with props of second (like merge/assign) works on object properties.</p>
  
  <pre><code>type X = {
    a: string,
    b: string
  }
  
  type Y = {
    b: number,
    d: number
  }
  // how to type get type Z that is "merge" of X &amp; Y so that:
  let z: Z
  
  z.a =&gt; string
  z.b =&gt; number
  z.d =&gt; number
  </code></pre>
  
  <p><code>Z = X &amp; Y</code> gives that  z.a => string, z.b => string | number (I want it be just number)</p>