wrong signature for req.body and next()
- Dominant language
- JavaScript
- Stars
- 69.5k
- Forks
- 25k
- Avg merge
- 4d 20h
- Merged PRs (30d)
- 9
Description
This is a regression in v5
```
import { NextFunction, Request, Response } from 'express';
export function someMiddleware(){
return (req: Request, res: Response, next: NextFunction) => {
// Property 'body' does not exist on type 'Request>'.ts(2339)
req.body
// Property 'method' does not exist on type 'Request>'.ts(2339)
req.method
// This expression is not callable.
// Type 'NextFunction' has no call signatures.ts(2349)
next()
}
}
```
## Environment information
**Version**:
```json
"dependencies": {
"express": "^5.0.1",
"@types/express": "^5.0.0",
}
```
**Platform**:
Linux 3f32d8f1babe 6.11.0-17-generic #17~24.04.2-Ubuntu SMP PREEMPT_DYNAMIC Mon Jan 20 22:48:29 UTC 2 x86_64 GNU/Linux
**Node.js version**:
v22.12.0
Contributor guide
Assessment
This issue has not been assessed yet.