Skip to content

docs: fix parameter name in req.acceptsLanguages JSDoc - #7470

Open
hxperl wants to merge 1 commit into
expressjs:masterfrom
hxperl:fix/accepts-languages-jsdoc-param
Open

hxperl wants to merge 1 commit into
expressjs:masterfrom
hxperl:fix/accepts-languages-jsdoc-param

Conversation

@hxperl

@hxperl hxperl commented Sep 15, 2026

Copy link
Copy Markdown

The JSDoc for req.acceptsLanguages names the parameter ...lang, but the function declares ...languages, so the documented name does not exist in the signature.

Evidence (lib/request.js at HEAD, and test run after the fix):

* @param {String} ...lang
* @return {String|Array}
* @public
*/
req.acceptsLanguages = function(...languages) {

1260 passing (2s)      # npm test
exit 0                 # npx eslint lib/

Changed @param {String} ...lang to @param {String} ...languages; no code was changed.

This change was made with AI coding assistance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant