title: Why does require('react') cause "Import declaration conflicts" with typescript?
body: <p>I am trying to use Typescript with <a href="https://github.com/DefinitelyTyped/tsd" rel="nofollow"><code>tsd</code></a> (haven't upgraded to <a href="https://github.com/typings/typings" rel="nofollow"><code>typings</code></a> yet), React, and JSX together... oh my! Talk about build system intricacies...</p>
  
  <p>My <code>.tsx</code> file (Typescript + JSX) compiles fine (using <code>gulp-typescript</code>) when I use <code>import * as React from 'react'</code>. I get an error, however, when I use a <code>require</code> statement:</p>
  
  <pre><code>./typings/react/react-global.d.ts(17,1): error TS2440: Import declaration conflicts 
  with local declaration of 'React'
  </code></pre>
  
  <p>I wouldn't have been surprised if I just imported it wrong and there is some difference between old <code>require</code> and new <code>import</code> that I haven't grokked yet, but I thought the particular type conflict error I got was strange. </p>
  
  <p><strong>Just so I understand how imports interact with global tsd declarations better, why does the <code>require</code> statement cause an error here?</strong></p>
  
  <p>Here is my <code>index.tsx</code>:</p>
  
  <pre><code>/// &lt;reference path="../typings/tsd.d.ts" /&gt;
  
  const config = require('../config')
  const express = require('express')
  const reactDomServer = require('react-dom/server')
  const app = express()
  
  // THIS WORKS
  import * as React from 'react'
  
  // THIS DOES NOT
  //const React = require('react')
  
  app.get('/', (req, res) =&gt; {
    const element = &lt;h1&gt;Hello Denver!&lt;/h1&gt;
    res.send(reactDomServer.renderToString(element))
  })
  
  const server = app.listen(process.env.port || config.port, () =&gt;
    console.log(`Server listening on port ${server.address().port}!`)
  )
  </code></pre>
  
  <p>Here is my <code>../typings/tsd.d.ts</code>:</p>
  
  <pre><code>/// &lt;reference path="react-router/history.d.ts" /&gt;
  /// &lt;reference path="react-router/react-router.d.ts" /&gt;
  /// &lt;reference path="react/react-addons-create-fragment.d.ts" /&gt;
  /// &lt;reference path="react/react-addons-css-transition-group.d.ts" /&gt;
  /// &lt;reference path="react/react-addons-linked-state-mixin.d.ts" /&gt;
  /// &lt;reference path="react/react-addons-perf.d.ts" /&gt;
  /// &lt;reference path="react/react-addons-pure-render-mixin.d.ts" /&gt;
  /// &lt;reference path="react/react-addons-test-utils.d.ts" /&gt;
  /// &lt;reference path="react/react-addons-transition-group.d.ts" /&gt;
  /// &lt;reference path="react/react-addons-update.d.ts" /&gt;
  /// &lt;reference path="react/react-dom.d.ts" /&gt;
  /// &lt;reference path="react/react-global.d.ts" /&gt;
  /// &lt;reference path="react/react.d.ts" /&gt;
  /// &lt;reference path="node/node.d.ts" /&gt;
  /// &lt;reference path="express-serve-static-core/express-serve-static-core.d.ts" /&gt;
  /// &lt;reference path="express/express.d.ts" /&gt;
  /// &lt;reference path="mime/mime.d.ts" /&gt;
  /// &lt;reference path="serve-static/serve-static.d.ts" /&gt;
  </code></pre>