Skip to content

doc: clarify dns.lookup() callback signature when all is true#62800

Open
galaxy4276 wants to merge 1 commit intonodejs:mainfrom
galaxy4276:doc/dns-lookup-callback-addresses
Open

doc: clarify dns.lookup() callback signature when all is true#62800
galaxy4276 wants to merge 1 commit intonodejs:mainfrom
galaxy4276:doc/dns-lookup-callback-addresses

Conversation

@galaxy4276
Copy link
Copy Markdown

@galaxy4276 galaxy4276 commented Apr 18, 2026

Summary

The callback parameter block for dns.lookup() only documented the default signature (err, address, family). When options.all is set to true, the callback signature changes to (err, addresses), but the addresses argument was absent from the structured parameter documentation.
it was only mentioned in prose below.

Changes

  • Add addresses {Object[]} to the callback parameter block, describing
    the array of { address, family } objects returned when options.all
    is true
  • Add "Not provided when options.all is true" notes to address and
    family parameters to make the two code paths explicit

Fixes: #57355

Test plan

  • Documentation change only — no runtime behavior affected
  • make lint-md passes

Document the `addresses` argument returned by the callback when
`options.all` is true, and note that `address` and `family` are
not provided in that case. Fixes nodejs#57355

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/net

@nodejs-github-bot nodejs-github-bot added dns Issues and PRs related to the dns subsystem. doc Issues and PRs related to the documentations. labels Apr 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dns Issues and PRs related to the dns subsystem. doc Issues and PRs related to the documentations.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dns.lookup signature out of date

2 participants