title: Property 'className' does not exist on type '{ props: ReactNode; }'
body: <p>I am currently migrating a Next.js project from JavaScript to TypeScript, and I've run into an error: <code>Property 'className' does not exist on type '{ props: ReactNode; }'</code>. In Javascript, I can extract className from props but typescript cannot find the type. Here is the code:</p>
  <pre class="lang-js prettyprint-override"><code>import { useRouter } from 'next/router'
  import Link from 'next/link'
  import { ReactNode } from 'react'
  
  export { NavLink }
  
  NavLink.defaultProps = {
    exact: false,
  }
  
  interface NavLinkProps {
    href: string
    exact?: boolean
    children: ReactNode
    props: ReactNode
  }
  
  function NavLink({ href, exact, children, ...props }: NavLinkProps) {
    const { pathname } = useRouter()
    const isActive = exact ? pathname === href : pathname.startsWith(href)
  
    if (isActive) {
      props.className += ' active'
    }
  
    return (
      &lt;Link href={href}&gt;
        &lt;a {...props}&gt;{children}&lt;/a&gt;
      &lt;/Link&gt;
    )
  }
  
  }
  </code></pre>