title: Creating a new object in Typescript is giving an error that it requires an extra comma
body: <p>I have the following classes:</p>
  <pre><code>export class datalist
  {
      data: mydata[];
  }
  
  export class mydata
  {
      data1: string;
      data2: string;
  }
  </code></pre>
  <p>I'm trying to create these types using the following syntax:</p>
  <pre><code>const mydatalist: datalist = {
    ...new datalist(),
    data: this.somedata.map(function(x, i) {
      return {          
        data1: x.somedata1, 
        data2: x.somedata2 
      };
    }
  };
  </code></pre>
  <p>However, I get the following error:</p>
  <blockquote>
  <p>',' expected</p>
  </blockquote>
  <p>Please could someone point me to what I'm doing wrong?</p>