title: declare type PromiseConstructorLike, new Promise in TypeScript
body: <p>I'm editing TypeScript files, and <code>Promise</code> isn't found by the TypeScript compiler or in Visual Studio Code. Instead <code>PromiseConstructorLike, PromiseLike&lt;T&gt;</code> are found as shown in <a href="http://file://C:%5CProgram%20Files%20(x86)%5CMicrosoft%20VS%20Code%5Cresources%5Capp%5Cextensions%5Ctypescript%5Cserver%5Ctypescript%5Clib%5Clib.d.ts" rel="nofollow">lib.d.ts</a> or <a href="https://github.com/Microsoft/TypeScript/blob/master/lib/lib.es6.d.ts" rel="nofollow">lib.es6.d.ts</a> below.</p>
  
  <pre><code>declare type PromiseConstructorLike = new &lt;T&gt;(executor: (resolve: (value?: T | PromiseLike&lt;T&gt;) =&gt; void, reject: (reason?: any) =&gt; void)
  =&gt; void) =&gt; PromiseLike&lt;T&gt;;
  
  interface PromiseLike&lt;T&gt; {
      /**
      * Attaches callbacks for the resolution and/or rejection of the Promise.
      * @param onfulfilled The callback to execute when the Promise is resolved.
      * @param onrejected The callback to execute when the Promise is rejected.
      * @returns A Promise for the completion of which ever callback is executed.
      */
      then&lt;TResult&gt;(onfulfilled?: (value: T) =&gt; TResult | PromiseLike&lt;TResult&gt;, onrejected?: (reason: any) =&gt; TResult | PromiseLike&lt;TResult&gt;): PromiseLike&lt;TResult&gt;;
      then&lt;TResult&gt;(onfulfilled?: (value: T) =&gt; TResult | PromiseLike&lt;TResult&gt;,
  </code></pre>
  
  <p>I tried placing the following in my TypeScript file </p>
  
  <pre><code>var Promise : PromiseConstructorLike;
  ...
  
  new Promise(function (resolve, reject) {
      ...
      return value;
  
  }).then(value =&gt; {
      ...
  });
  </code></pre>
  
  <p>which compiles, however I get a runtime error </p>
  
  <pre><code>TypeError: Promise is not a constructor
  </code></pre>
  
  <p>What is the correct syntax or code to accomplish a <code>new Promise(</code> as shown above?</p>