Skip to content

Commit b331494

Browse files
tniessenMylesBorins
authored andcommitted
doc: fix types and description for dns.resolveTxt
Backport-PR-URL: #16316 PR-URL: #15472 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Roman Reiss <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent c2971ce commit b331494

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

doc/api/dns.md

+7-3
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)