title: React router with typescript
body: <p>I'm using <code>react-router</code> and <code>react-router-dom</code> with Typescript to build an application. I have defined my routes in this way (<code>routes.tsx</code>):</p>
  
  <pre><code>import * as React from 'react';
  import createBrowserHistory from 'history/createBrowserHistory';
  import { Router, Route, Switch } from 'react-router-dom';
  import SignUp from '../routes/signup';
  
  const history = createBrowserHistory();
  
  const Routes: React.StatelessComponent&lt;{}&gt; = () =&gt; (
    &lt;Router history={history}&gt;
      &lt;Switch&gt;
        &lt;Route exact path='/signup' component={SignUp} /&gt;
      &lt;/Switch&gt;
    &lt;/Router&gt;
  );
  
  export default Router;
  </code></pre>
  
  <p>I have a main <code>App</code> component that renders this <code>Routes</code> component:</p>
  
  <pre><code>import * as React from 'react';
  import Routes from './routes';
  
  const App: React.StatelessComponent&lt;{}&gt; = () =&gt; (
    &lt;Routes /&gt;
  );
  
  export default App;
  </code></pre>
  
  <p>The compiler throws this error</p>
  
  <pre><code>(5,4): Type '{}' is not assignable to type 'Readonly&lt;RouterProps&gt;'.
    Property 'history' is missing in type '{}'.
  </code></pre>
  
  <p>I am new to TS so I am not sure what exactly is going on.</p>