doc: fix types and description for dns.resolveTxt

Backport-PR-URL: https://github.com/nodejs/node/pull/16316
PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
Tobias Nießen authored and Myles Borins committed 2017-10-26 00:21:31 -04:00
1 parent 6e06d0e1b5
commit 37b93724ff
1 file changed
+7 -3
+7 -3
View File
@@ -193,7 +193,7 @@ records. The type and structure of individual results varies based on `rrtype`:
| `'PTR'` | pointer records | {string} | [`dns.resolvePtr()`][] |
| `'SOA'` | start of authority records | {Object} | [`dns.resolveSoa()`][] |
| `'SRV'` | service records | {Object} | [`dns.resolveSrv()`][] |
| `'TXT'` | text records | {string} | [`dns.resolveTxt()`][] |
| `'TXT'` | text records | {string[]} | [`dns.resolveTxt()`][] |
On error, `err` is an [`Error`][] object, where `err.code` is one of the
[DNS error codes](#dns_error_codes).
@@ -359,10 +359,14 @@ be an array of strings containing the reply records.
<!-- YAML
added: v0.1.27
-->
- `hostname` {string}
- `callback` {Function}
- `err` {Error}
- `records` {string[][]}
Uses the DNS protocol to resolve text queries (`TXT` records) for the
`hostname`. The `addresses` argument passed to the `callback` function is
is a two-dimensional array of the text records available for `hostname` (e.g.,
`hostname`. The `records` argument passed to the `callback` function is a
two-dimensional array of the text records available for `hostname` (e.g.,
`[ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ]`). Each sub-array contains TXT chunks of
one record. Depending on the use case, these could be either joined together or
treated separately.