typedRoutes
Source URL: https://nextjs.org/docs/app/api-reference/config/next-config-js/typedRoutes
typedRoutes
Section titled “typedRoutes”Note: This option has been marked as stable, so you should use
typedRoutesinstead ofexperimental.typedRoutes.
Support for statically typed links. This feature requires using TypeScript in your project.
/** @type {import('next').NextConfig} */const nextConfig = { typedRoutes: true,}
module.exports = nextConfig