title: Typescript error "class is not a constructor"
body: <p>I am running the following typescript code in the ES6 target environment and it says that "Cars is not a constructor"</p>
  
  <p>I have followed the <a href="https://stackoverflow.com/questions/34581714/why-does-this-typescript-output-class-is-not-a-constructor">link</a> and tried changing the target environment to ES5. It is working fine. Can some one tell why it is not working for target ES6.</p>
  
  <p>Here is my TypeScript code:</p>
  
  <pre><code>export class Cars {
      constructor(public len: number,public wid: number) { }
  }
  
  export function getSize(): Cars {
      return new Cars(20, 30);
  };
  </code></pre>
  
  <p>Error is "Cars is not a constructor" in the function getSize.</p>
  
  <p>By the way I am trying to load all the files with Systemjs.</p>
  
  <p>By the way I am getting the error in the browser........ Not while compiling it...</p>
  
  <p>Here is the compiled code of the above typescript....</p>
  
  <pre><code>System.register([], function(exports_1, context_1) {
      "use strict";
      var __moduleName = context_1 &amp;&amp; context_1.id;
      var Cars;
      function getSize() {
          return new Cars(20, 30);
      }
      exports_1("getSize", getSize);
      return {
          setters:[],
          execute: function() {
              class Cars {
                  constructor(len, wid) {
                      this.len = len;
                      this.wid = wid;
                  }
              }
              ;
              exports_1("Cars", Cars);
          }
      }
  });
  //# sourceMappingURL=Cars.js.map
  </code></pre>