title: TypeScript Promise TS2304 TS2529
body: <p>I had the following code:</p>
  
  <pre><code>function asyncFunc1(): Promise&lt;string&gt; {
      return new Promise&lt;string&gt;(x =&gt; x);
  }
  </code></pre>
  
  <p>which produced the following error:</p>
  
  <blockquote>
    <p>TS2304: cannot find name 'Promise'</p>
  </blockquote>
  
  <p>So I changed it to explicitly declare 'Promise':</p>
  
  <pre><code>///&lt;reference path="../typings/modules/bluebird/index.d.ts" /&gt;
  
  import * as Promise from 'bluebird';
  
  function asyncFunc1(): Promise&lt;string&gt; {
      return new Promise&lt;string&gt;(x =&gt; x);
  }
  </code></pre>
  
  <p>and now I get the following error:</p>
  
  <blockquote>
    <p>TS2529: Duplicate identifier 'Promise'. Compiler reserves name
    'Promise' in top level scope of a module containing async functions</p>
  </blockquote>
  
  <p>How can I solve this paradox?</p>