Skip to content

Document TSConfig changed for typedRoutes #83010

@danilofuchs

Description

@danilofuchs

Link to the code that reproduces this issue

https://github.com/danilofuchs/reproduction-pages-router-typed-routes

To Reproduce

To enable typedRoutes correctly as of 15.5.0, the following TSConfig change is required:

"include": [
    "next-env.d.ts",
+   ".next/types/**/*.ts",
    "**/*.ts",
    "**/*.tsx"
],

Current vs. Expected behavior

  • Automatically add this to TSConfig if possible
  • Document this requirement in the website

Provide environment information

Operating System:
  Platform: linux
  Arch: x64
  Version: #202412060638~1753385872~22.04~dc2e00d SMP PREEMPT_DYNAMIC Thu J
  Available memory (MB): 31835
  Available CPU cores: 12
Binaries:
  Node: 22.18.0
  npm: 10.9.3
  Yarn: 1.22.19
  pnpm: 10.8.0
Relevant Packages:
  next: 15.5.0 // Latest available version is detected (15.5.0).
  eslint-config-next: N/A
  react: 19.1.1
  react-dom: 19.1.1
  typescript: N/A
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

Linking and Navigating

Which stage(s) are affected? (Select all that apply)

Other (Deployed), next dev (local)

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Linking and NavigatingRelated to Next.js linking (e.g., <Link>) and navigation.locked

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions