Skip to main content
promises.resolveTxt - node__dns.d.ts - Node documentation
function promises.resolveTxt

Usage in Deno

```typescript import { promises } from "node:node__dns.d.ts"; ```
resolveTxt(hostname: string): Promise<string[][]>
Uses the DNS protocol to resolve text queries (`TXT` records) for the `hostname`. On success, the `Promise` is resolved with 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.

Parameters

hostname: string

Return Type

Promise<string[][]>