Skip to content

Commit 3888a57

Browse files
committed
doc: fix types and description for dns.resolveTxt
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 60460bf commit 3888a57

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

doc/api/dns.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ records. The type and structure of individual results varies based on `rrtype`:
266266
| `'PTR'` | pointer records | {string} | [`dns.resolvePtr()`][] |
267267
| `'SOA'` | start of authority records | {Object} | [`dns.resolveSoa()`][] |
268268
| `'SRV'` | service records | {Object} | [`dns.resolveSrv()`][] |
269-
| `'TXT'` | text records | {string} | [`dns.resolveTxt()`][] |
269+
| `'TXT'` | text records | {string[]} | [`dns.resolveTxt()`][] |
270270
| `'ANY'` | any records | {Object} | [`dns.resolveAny()`][] |
271271

272272
On error, `err` is an [`Error`][] object, where `err.code` is one of the
@@ -479,11 +479,11 @@ added: v0.1.27
479479
- `hostname` {string}
480480
- `callback` {Function}
481481
- `err` {Error}
482-
- `addresses` {string[]}
482+
- `records` {string[][]}
483483

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

0 commit comments

Comments
 (0)