Types of headers
, rewrites
and redirects
methods don't support synchronous returns
#74547
Labels
headers
, rewrites
and redirects
methods don't support synchronous returns
#74547
Link to the code that reproduces this issue
https://github.com/wellwelwel/next-reproduction
To Reproduce
To reproduce the issues (missing types), simply clone the above repository and run:
npm i npm test
npm i
, you can also notice the issues visually in theconfigs.ts
file.headers
,rewrites
, andredirects
return types #74546.Current vs. Expected behavior
The expectation is that both return types will be accepted when using synchronous returns in the configuration file, as shown in the images:
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 24.1.0: Thu Oct 10 21:03:11 PDT 2024; root:xnu-11215.41.3~2/RELEASE_ARM64_T6020 Available memory (MB): 65536 Available CPU cores: 24 Binaries: Node: 23.5.0 npm: 11.0.0 Yarn: 4.4.1 pnpm: N/A Relevant Packages: next: 15.1.3 // Latest available version is detected (15.1.3). eslint-config-next: N/A react: 18.3.1 react-dom: 18.3.1 typescript: 5.7.2 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
TypeScript
Which stage(s) are affected? (Select all that apply)
Other (Deployed)
Additional context
Note
For some reason, the #74545 was closed immediately, but the link to repro is valid. Trying one more time to see if it's a false positive 🙌The text was updated successfully, but these errors were encountered: