title: what is new() in Typescript?
body: <p>I encountered <code>new()</code> in the official document <a href="https://www.typescriptlang.org/docs/handbook/generics.html" rel="noreferrer">here</a> about generics. </p>
  
  <p>Here is the code context:</p>
  
  <pre><code>function create&lt;T&gt;(c: { new(): T; } ): T {
      return new c();
  }
  </code></pre>
  
  <p>The above code is transpiled to the following JavaScript code:</p>
  
  <pre><code>function create(c) {
      return new c();
  }
  </code></pre>
  
  <p><code>new()</code> is illegal syntax in JavaScript. What does it mean in TypeScript? </p>
  
  <p>Furthermore, what does <code>{new(): T; }</code> mean? I know it must be a type, but how? </p>