title: Replacing property of a typescript type
body: <p>I have a type:</p>
  
  <pre><code>type first = {
      one: number;
      two: string;
      three: {
          four: string,
          five: number,
      }
  }
  </code></pre>
  
  <p>It is applicable to one instance of a variable that I declare in one part of my application, but not exactly applicable to another (second) instance of a variable. </p>
  
  <p>The type that would be suitable for second instance of a variable would look like this:</p>
  
  <pre><code>type second = {
      one: number;
      two: string;
      three: {
          four: string,
          five: number[], //difference
      }
  }
  </code></pre>
  
  <p>I don't want to declare a new type from scratch for a small difference and would like to assimilate the existing type <code>first</code> by replacing the type of property <code>three</code>.</p>
  
  <p>I tried to do it this way:</p>
  
  <pre><code>type second = Pick&lt;first, Exclude&lt;keyof first, 'three'&gt;&gt; &amp; { 
      three: {
          four: string,
          five: number[], //difference
      } 
  }
  </code></pre>
  
  <p>But it gives me an error and I get this type definition on hover:</p>
  
  <pre><code>type second = {
      one: number;
      two: string;
      three: {
          four: string,
          five: number,
      };
      three: {
          four: string,
          five: number,
      };
  }
  </code></pre>
  
  <p>Notice 2 properties <code>three</code>.</p>
  
  <p>What am I doing wrong?</p>