title: Typescript ConnectedRouter No overload matches this call
body: <p>I am new to Typescript. I decide to migrate one of my React Javascript projects to Typescript. Because I am using Connected React Router, I followed its example <a href="https://github.com/supasate/connected-react-router/tree/master/examples/typescript" rel="nofollow noreferrer">here</a>, but my IDE (IntelliJ) complains that &quot;No overload matches this call&quot;. Here is my App.tsx</p>
  <pre><code>import React from 'react';
  import { History } from 'history'
  import { ConnectedRouter } from 'connected-react-router'
  import {routes} from './redux/router/router';
  
  interface AppProps {
    history: History
  };
  
  const App = ({history}: AppProps) =&gt; {
    return (
      &lt;ConnectedRouter history={history}&gt;
        {routes}
      &lt;/ConnectedRouter&gt;
    );
  };
  
  export default App;
  </code></pre>
  <p>My routes are defined like this</p>
  <pre><code>import {Route, Switch} from 'react-router-dom';
  
  const routes = (
    &lt;&gt;
      &lt;Switch&gt;
        &lt;Route exact path='/' render={() =&gt; (&lt;Page&gt;&lt;Articles /&gt;&lt;/Page&gt;)} /&gt;
        ....
      &lt;/Switch&gt;
    &lt;/&gt;
  );
  </code></pre>
  <p>The error message in IDE is
  <a href="https://i.stack.imgur.com/mXqzN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mXqzN.png" alt="enter image description here" /></a></p>
  <p>Here are a few related dependencies</p>
  <pre><code>&quot;connected-react-router&quot;: &quot;^6.9.2&quot;
  &quot;history&quot;: &quot;^4.7.2&quot;,
  &quot;react&quot;: &quot;^17.0.2&quot;,
  &quot;react-redux&quot;: &quot;^7.2.6&quot;,
  &quot;react-router&quot;: &quot;^5.2.1&quot;,
  &quot;react-router-dom&quot;: &quot;^5.2.1&quot;,
  &quot;@types/history&quot;: &quot;^4.7.2&quot;,
  &quot;@types/react&quot;: &quot;^18.0.9&quot;,
  &quot;@types/react-dom&quot;: &quot;^18.0.4&quot;,
  &quot;@types/react-redux&quot;: &quot;^7.1.24&quot;,
  &quot;@types/react-router&quot;: &quot;^5.1.18&quot;,
  </code></pre>
  <p>Any suggestion what may cause Typescript to complain? Thanks.</p>