Remove router.param(fn) from 5.x docs (#1884)

It has been deprecated since 4.11.0 and in 5.x `router.param()` requires name as the first argument.

The description in migration guide was copied from `app.param(fn)` that was mentioned there.

Co-authored-by: krzysdz <krzysdz@users.noreply.github.com>
Co-authored-by: Sebastian Beltran <bjohansebas@gmail.com>
This commit is contained in:
krzysdz
2025-04-26 00:17:39 +00:00
committed by GitHub
parent ad856cd7e4
commit 021c4d69bb
2 changed files with 5 additions and 61 deletions

View File

@@ -56,6 +56,7 @@ You can find the list of available codemods [here](https://github.com/expressjs/
<li><a href="#res.send.body">res.send(body, status)</a></li>
<li><a href="#res.send.status">res.send(status)</a></li>
<li><a href="#res.sendfile">res.sendfile()</a></li>
<li><a href="#router.param">router.param(fn)</a></li>
<li><a href="#express.static.mime">express.static.mime</a></li>
<li><a href="#express:router-debug-logs">express:router debug logs</a></li>
</ul>
@@ -335,6 +336,10 @@ app.get('/user', (req, res) => {
})
```
<h4 id="router.param">router.param(fn)</h4>
The `router.param(fn)` signature was used for modifying the behavior of the `router.param(name, fn)` function. It has been deprecated since v4.11.0, and Express 5 no longer supports it at all.
<h4 id="express.static.mime">express.static.mime</h4>
In Express 5, `mime` is no longer an exported property of the `static` field.