title: How to merge class instances in Typescript?
body: <p>I have a class like this:</p>
  
  <pre><code>class Person {
      private _age: number;
  
      get age(): number {
          return this._age;
      }
  
      set age(value: number) {
          this._age = value;
      }
  }
  </code></pre>
  
  <p>And an instance of that class:</p>
  
  <pre><code>let peter = new Person();
  peter.age = 30;
  </code></pre>
  
  <p>I want to have another instance of that class by simply using the spread operator:</p>
  
  <pre><code>let marc = {
      ...peter,
      age: 20
  }
  </code></pre>
  
  <p>But this does not result in an instance of <code>Person</code> but in an object without the getter and setter of <code>Person</code>.</p>
  
  <p>Is it possible to merge class instances somehow or do I need to use <code>new Person()</code> again for <code>mark</code>?</p>