title: Object.assign() and Spread properties still mutating original
body: <p>I'm trying to assign the value of an array element to an object. After first attempting something like, e.g.<code>bar = foo[0];</code> I've discovered that any change to <code>bar</code> also changes <code>foo[0]</code>, due to having the same reference.</p>
  
  <p>Awesome, thought no one, and upon reading up on <em>immutability</em> and the ES6 <em>Object.assign()</em> method and <em>spread</em> properties, I thought it would fix the issue. However, in this case it doesn't. What am I missing?</p>
  
  <p><strong>EDIT:</strong> Sorry about the <em>accountTypes</em> confusion, I fixed the example.
  Also, I would like to keep the class structure of <em>Settings</em>, so <code>let copy = JSON.parse(JSON.stringify(original));</code> is not really what I'm after in this case.</p>
  
  <pre><code>//this object will change according to a selection
  currentPreset;
  
  //this should remain unchanged
  presets: {name: string, settings: Settings}[] = [];
  
  
    ngOnInit()
    {
      this.currentPreset = {
        name: '',
        settings: new Settings()
      }
  
      this.presets.push({name: 'Preset1', settings: new Settings({
          settingOne: 'foo',
          settingTwo: false,
          settingThree: 14
        })
      });
  
    }
  
   /**
    * Select an item from the `presets` array and assign it, 
    * by value(not reference), to `currentPreset`.
    * 
    * @Usage In an HTML form, a &lt;select&gt; element's `change` event calls 
    * this method to fill the form's controls with the values of a
    * selected item from the `presets` array. Subsequent calls to this
    * method should not affect the value of the `presets` array.
    *
    * @param value - Expects a numerical index or the string 'new'
    */
    setPreset(value)
    {
      if(value == 'new')
      {
        this.currentPreset.name = '';
        this.currentPreset.settings.reset();
      }
      else
      {
        this.currentPreset = {...this.presets[value]};
        //same as above
        //this.currentPreset = Object.assign({}, this.presets[value]);
      }
    }
  </code></pre>