title: useParams() can not parseInt to number typescript
body: <p>the <code>heroid</code> type is string, I try to convert to number always show error.</p>
  <p><strong>code:</strong></p>
  <pre><code>import useHero from '../../hooks/useHero';
  import {useParams} from 'react-router-dom'
  
  
  function Herospages() {
      const {heroId} = useParams() 
     const value = parseInt(heroId)
     const{data,isLoading} =  useHero(value)
  ...}
  </code></pre>
  <p>the <code>useHero</code> is my hook from <code>useQuery</code><br></p>
  <p><strong>error:</strong></p>
  <pre><code>Argument of type 'string | undefined' is not assignable to parameter of type 'string'.
    Type 'undefined' is not assignable to type 'string'
  </code></pre>