Was creating a custom component with next/link inside "Currently, experimental support includes any string literal, including dynamic segments. For non-literal strings, you currently need to manually cast the href with as Route:" This could be bad practice idk but it works ---- // First update next config typed routes to experimental /*in next config: @type {import('next').NextConfig} const nextConfig = { experimental: { typedRoutes: true, }, }*/ ---- // To accept href in a custom component wrapping next/link, use a generic: import type { Route } from 'next' import Link from 'next/link' // add the whole <T extends string> part function Card<T extends string>({ href }: { href: Route<T> | URL }) { return ( <Link href={href}> <div>My Card</div> </Link> ) }