title: What to declare react-router argument as in TypeScript
body: <p>I'm trying to get set up with react-router using Typescript in a way which accepts a parameter.</p>
  
  <p>In my <code>render</code> element I have</p>
  
  <pre><code>&lt;Route path="/show/:id" component={TestComp} /&gt;
  </code></pre>
  
  <p>And I define <code>TestComp</code> as</p>
  
  <pre><code>const TestComp = ({ match }) =&gt; (
      &lt;div&gt;
          &lt;h2&gt;Showing specified ID: {match.params.id}&lt;/h2&gt;
      &lt;/div&gt;
  )
  </code></pre>
  
  <p>However, VS Code underlines the <code>match</code> parameter (in the declaration of <code>TestComp</code>) and tells me</p>
  
  <blockquote>
    <p>Binding element 'match' implicitly has an 'any' type.</p>
  </blockquote>
  
  <p>and it fails to compile.</p>
  
  <p>Can anyone tell me as what type <code>match</code> should be declared? I've tried <code>RouteProps</code> but that doesn't work either. Looking in the index.d.ts, I think it's defined as <code>match&lt;P&gt;</code> but I'm not sure how to declare a parameter as being of a generic type.</p>
  
  <p><strong>UPDATE</strong><br>
  Based on the comments to @TarasPolovyi's answer, I've added the following:</p>
  
  <p><a href="https://i.stack.imgur.com/2xhRV.png" rel="noreferrer"><img src="https://i.stack.imgur.com/2xhRV.png" alt="enter image description here"></a></p>
  
  <p>As you can see, this still has problems.</p>