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

Usage in Deno

```typescript import { resolveTxt } from "node:node__dns.d.ts"; ```
resolveTxt(
hostname: string,
callback: (
err: ErrnoException | null,
addresses: string[][],
) => void
,
): void
> [!WARNING] Deno compatibility > The `ttl` option is not supported. Uses the DNS protocol to resolve text queries (`TXT` records) for the `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.

Parameters

hostname: string
callback: (
err: ErrnoException | null,
addresses: string[][],
) => void

Return Type

void