Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 37b9372

Browse filesBrowse files
tniessenMylesBorins
authored andcommitted
doc: fix types and description for dns.resolveTxt
Backport-PR-URL: #16316 PR-URL: #15472 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 6e06d0e commit 37b9372
Copy full SHA for 37b9372

File tree

Expand file treeCollapse file tree

1 file changed

+7
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-3
lines changed
Open diff view settings
Collapse file

‎doc/api/dns.md‎

Copy file name to clipboardExpand all lines: doc/api/dns.md
+7-3Lines changed: 7 additions & 3 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ records. The type and structure of individual results varies based on `rrtype`:
193193
| `'PTR'` | pointer records | {string} | [`dns.resolvePtr()`][] |
194194
| `'SOA'` | start of authority records | {Object} | [`dns.resolveSoa()`][] |
195195
| `'SRV'` | service records | {Object} | [`dns.resolveSrv()`][] |
196-
| `'TXT'` | text records | {string} | [`dns.resolveTxt()`][] |
196+
| `'TXT'` | text records | {string[]} | [`dns.resolveTxt()`][] |
197197

198198
On error, `err` is an [`Error`][] object, where `err.code` is one of the
199199
[DNS error codes](#dns_error_codes).
@@ -359,10 +359,14 @@ be an array of strings containing the reply records.
359359
<!-- YAML
360360
added: v0.1.27
361361
-->
362+
- `hostname` {string}
363+
- `callback` {Function}
364+
- `err` {Error}
365+
- `records` {string[][]}
362366

363367
Uses the DNS protocol to resolve text queries (`TXT` records) for the
364-
`hostname`. The `addresses` argument passed to the `callback` function is
365-
is a two-dimensional array of the text records available for `hostname` (e.g.,
368+
`hostname`. The `records` argument passed to the `callback` function is a
369+
two-dimensional array of the text records available for `hostname` (e.g.,
366370
`[ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ]`). Each sub-array contains TXT chunks of
367371
one record. Depending on the use case, these could be either joined together or
368372
treated separately.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.