Skip to content
VaelJS Blog

node:dns/promises

Node-compatible promise-based DNS resolution and Resolver APIs (node:dns/promises).

Available in vjs only (not available in vjs-lite). Enabled by default unless --no-node-compat is passed.

import ... from "node:dns/promises"
Since v0.0.0-alpha.2 vjs (V8)
Cargo feature: node-compat (enabled by default in vjs; absent in vjs-lite; disable with --no-node-compat)
import { lookup, resolve4 } from "node:dns/promises";
const entry = await lookup("localhost");
console.log(entry.address, entry.family);
API Symbols
Constants (28)
ADDRCONFIGvjs onlyv0.0.0-alpha.2
getaddrinfo hint flag limiting results to configured address families.
ALLvjs onlyv0.0.0-alpha.2
getaddrinfo hint flag returning both IPv4-mapped and IPv6 addresses.
V4MAPPEDvjs onlyv0.0.0-alpha.2
getaddrinfo hint flag returning IPv4-mapped IPv6 addresses when no native IPv6 exists.
BADFAMILYvjs onlyv0.0.0-alpha.2
DNS error code: address family not supported.
BADFLAGSvjs onlyv0.0.0-alpha.2
DNS error code: invalid flags passed to query.
BADHINTSvjs onlyv0.0.0-alpha.2
DNS error code: invalid hints value.
BADNAMEvjs onlyv0.0.0-alpha.2
DNS error code: malformed hostname.
BADQUERYvjs onlyv0.0.0-alpha.2
DNS error code: malformed DNS query.
BADRESPvjs onlyv0.0.0-alpha.2
DNS error code: malformed DNS reply.
BADSTRvjs onlyv0.0.0-alpha.2
DNS error code: malformed IP string.
CANCELLEDvjs onlyv0.0.0-alpha.2
DNS error code: query cancelled.
CONNREFUSEDvjs onlyv0.0.0-alpha.2
DNS error code: could not contact DNS servers.
DESTRUCTIONvjs onlyv0.0.0-alpha.2
DNS error code: channel is being destroyed.
EOFvjs onlyv0.0.0-alpha.2
DNS error code: end of file.
FILEvjs onlyv0.0.0-alpha.2
DNS error code: error reading configuration file.
FORMERRvjs onlyv0.0.0-alpha.2
DNS error code: DNS server reports query format error.
LOADIPHLPAPIvjs onlyv0.0.0-alpha.2
DNS error code: error loading iphlpapi.dll on Windows.
NODATAvjs onlyv0.0.0-alpha.2
DNS error code: DNS server returned no data.
NOMEMvjs onlyv0.0.0-alpha.2
DNS error code: out of memory.
NONAMEvjs onlyv0.0.0-alpha.2
DNS error code: non-existent host name.
NOTFOUNDvjs onlyv0.0.0-alpha.2
DNS error code: domain name not found (ENOTFOUND).
NOTIMPvjs onlyv0.0.0-alpha.2
DNS error code: DNS server does not implement requested operation.
NOTINITIALIZEDvjs onlyv0.0.0-alpha.2
DNS error code: resolver library not initialized.
REFUSEDvjs onlyv0.0.0-alpha.2
DNS error code: DNS server refused query.
SERVFAILvjs onlyv0.0.0-alpha.2
DNS error code: DNS server returned general failure.
TIMEOUTvjs onlyv0.0.0-alpha.2
DNS error code: timeout contacting DNS servers.
ADDRGETNETWORKPARAMSvjs onlyv0.0.0-alpha.2
DNS error code: error finding network parameters on Windows.
promisesvjs onlyv0.0.0-alpha.2
Self-reference to the node:dns/promises namespace.
functionSince v0.0.0-alpha.2vjs only
export function getDefaultResultOrder(): import("node:dns").ResultOrder;

Return the default result ordering used by lookup().

Returns
import("node:dns").ResultOrder
functionSince v0.0.0-alpha.2vjs only
export function setDefaultResultOrder(order: import("node:dns").ResultOrder): void;

Set the default result ordering used by lookup().

Parameters
NameTypeDescription
orderimport("node:dns").ResultOrder—
Returns
void
functionSince v0.0.0-alpha.2vjs only
export function getServers(): string[];

Return the array of configured DNS server IP strings.

Returns
string[]
functionSince v0.0.0-alpha.2vjs only
export function setServers(servers: readonly string[]): void;

Replace the array of configured DNS server IP strings.

Parameters
NameTypeDescription
serversreadonly string[]—
Returns
void
functionSince v0.0.0-alpha.2vjs only
export function lookup(
  hostname: string,
  options: import("node:dns").LookupOptions & { all: true },
): Promise<import("node:dns").LookupAddress[]>;
export function lookup(
  hostname: string,
  options?: number | import("node:dns").LookupOptions,
): Promise<import("node:dns").LookupAddress>;

Resolve hostname into all matching addresses via OS getaddrinfo.

Resolve hostname into the first matching { address, family } via OS getaddrinfo.

Parameters
NameTypeDescription
hostnamestringHostname or IP literal.
options optionalimport("node:dns").LookupOptions & { all: true } | number | import("node:dns").LookupOptionsLookup options with all: true; Optional family integer or LookupOptions.
Returns
  • Promise<import("node:dns").LookupAddress[]> — Promise resolving to an array of LookupAddress objects.
  • Promise<import("node:dns").LookupAddress> — Promise resolving to a LookupAddress.
functionSince v0.0.0-alpha.2vjs only
export function lookupService(
  address: string,
  port: number,
): Promise<{ hostname: string; service: string }>;

Reverse-resolve (address, port) to { hostname, service } via OS getnameinfo.

Parameters
NameTypeDescription
addressstringIPv4 or IPv6 address string.
portnumberNumeric port (0..=65535).
Returns
Promise<{ hostname: string; service: string }> — Promise resolving to { hostname, service }.
functionSince v0.0.0-alpha.2vjs only
export function resolve(hostname: string, rrtype?: string): Promise<unknown>;

Resolve DNS records of rrtype (default "A") for hostname.

Parameters
NameTypeDescription
hostnamestring—
rrtype optionalstring—
Returns
Promise<unknown>
functionSince v0.0.0-alpha.2vjs only
export function resolve4(hostname: string): Promise<string[]>;
export function resolve4(
  hostname: string,
  options: import("node:dns").ResolveOptions & { ttl: true },
): Promise<import("node:dns").RecordWithTtl[]>;
export function resolve4(
  hostname: string,
  options?: import("node:dns").ResolveOptions,
): Promise<string[] | import("node:dns").RecordWithTtl[]>;

Resolve IPv4 (A) records for hostname.

Resolve IPv4 (A) records with TTL metadata when options.ttl is true.

Resolve IPv4 (A) records with options for hostname.

Parameters
NameTypeDescription
hostnamestring—
options optionalimport("node:dns").ResolveOptions & { ttl: true } | import("node:dns").ResolveOptions—
Returns
  • Promise<string[]>
  • Promise<import("node:dns").RecordWithTtl[]>
  • Promise<string[] | import("node:dns").RecordWithTtl[]>
functionSince v0.0.0-alpha.2vjs only
export function resolve6(hostname: string): Promise<string[]>;
export function resolve6(
  hostname: string,
  options: import("node:dns").ResolveOptions & { ttl: true },
): Promise<import("node:dns").RecordWithTtl[]>;
export function resolve6(
  hostname: string,
  options?: import("node:dns").ResolveOptions,
): Promise<string[] | import("node:dns").RecordWithTtl[]>;

Resolve IPv6 (AAAA) records for hostname.

Resolve IPv6 (AAAA) records with TTL metadata when options.ttl is true.

Resolve IPv6 (AAAA) records with options for hostname.

Parameters
NameTypeDescription
hostnamestring—
options optionalimport("node:dns").ResolveOptions & { ttl: true } | import("node:dns").ResolveOptions—
Returns
  • Promise<string[]>
  • Promise<import("node:dns").RecordWithTtl[]>
  • Promise<string[] | import("node:dns").RecordWithTtl[]>
functionSince v0.0.0-alpha.2vjs only
export function resolveAny(hostname: string): Promise<import("node:dns").AnyRecord[]>;

Resolve ANY records for hostname.

Parameters
NameTypeDescription
hostnamestring—
Returns
Promise<import("node:dns").AnyRecord[]>
functionSince v0.0.0-alpha.2vjs only
export function resolveCname(hostname: string): Promise<string[]>;

Resolve CNAME records for hostname.

Parameters
NameTypeDescription
hostnamestring—
Returns
Promise<string[]>
functionSince v0.0.0-alpha.2vjs only
export function resolveMx(hostname: string): Promise<import("node:dns").MxRecord[]>;

Resolve MX records for hostname.

Parameters
NameTypeDescription
hostnamestring—
Returns
Promise<import("node:dns").MxRecord[]>
functionSince v0.0.0-alpha.2vjs only
export function resolveNaptr(hostname: string): Promise<import("node:dns").NaptrRecord[]>;

Resolve NAPTR records for hostname.

Parameters
NameTypeDescription
hostnamestring—
Returns
Promise<import("node:dns").NaptrRecord[]>
functionSince v0.0.0-alpha.2vjs only
export function resolveNs(hostname: string): Promise<string[]>;

Resolve NS records for hostname.

Parameters
NameTypeDescription
hostnamestring—
Returns
Promise<string[]>
functionSince v0.0.0-alpha.2vjs only
export function resolvePtr(hostname: string): Promise<string[]>;

Resolve PTR records for hostname.

Parameters
NameTypeDescription
hostnamestring—
Returns
Promise<string[]>
functionSince v0.0.0-alpha.2vjs only
export function resolveSoa(hostname: string): Promise<import("node:dns").SoaRecord>;

Resolve SOA record for hostname.

Parameters
NameTypeDescription
hostnamestring—
Returns
Promise<import("node:dns").SoaRecord>
functionSince v0.0.0-alpha.2vjs only
export function resolveSrv(hostname: string): Promise<import("node:dns").SrvRecord[]>;

Resolve SRV records for hostname.

Parameters
NameTypeDescription
hostnamestring—
Returns
Promise<import("node:dns").SrvRecord[]>
functionSince v0.0.0-alpha.2vjs only
export function resolveTxt(hostname: string): Promise<string[][]>;

Resolve TXT records for hostname.

Parameters
NameTypeDescription
hostnamestring—
Returns
Promise<string[][]>
functionSince v0.0.0-alpha.2vjs only
export function reverse(ip: string): Promise<string[]>;

Reverse-resolve IP address ip to hostnames.

Parameters
NameTypeDescription
ipstring—
Returns
Promise<string[]>
classSince v0.0.0-alpha.2vjs only
export class Resolver {
  constructor(options?: import("node:dns").ResolverOptions);
  cancel(): void;
  getServers(): string[];
  setServers(servers: readonly string[]): void;
  setLocalAddress(ipv4?: string, ipv6?: string): void;
  resolve(hostname: string, rrtype?: string): Promise<unknown>;
  resolve4(hostname: string): Promise<string[]>;
  resolve4(
      hostname: string,
      options: import("node:dns").ResolveOptions & { ttl: true },
    ): Promise<import("node:dns").RecordWithTtl[]>;
  resolve4(
      hostname: string,
      options?: import("node:dns").ResolveOptions,
    ): Promise<string[] | import("node:dns").RecordWithTtl[]>;
  resolve6(hostname: string): Promise<string[]>;
  resolve6(
      hostname: string,
      options: import("node:dns").ResolveOptions & { ttl: true },
    ): Promise<import("node:dns").RecordWithTtl[]>;
  resolve6(
      hostname: string,
      options?: import("node:dns").ResolveOptions,
    ): Promise<string[] | import("node:dns").RecordWithTtl[]>;
  resolveAny(hostname: string): Promise<import("node:dns").AnyRecord[]>;
  resolveCname(hostname: string): Promise<string[]>;
  resolveMx(hostname: string): Promise<import("node:dns").MxRecord[]>;
  resolveNaptr(hostname: string): Promise<import("node:dns").NaptrRecord[]>;
  resolveNs(hostname: string): Promise<string[]>;
  resolvePtr(hostname: string): Promise<string[]>;
  resolveSoa(hostname: string): Promise<import("node:dns").SoaRecord>;
  resolveSrv(hostname: string): Promise<import("node:dns").SrvRecord[]>;
  resolveTxt(hostname: string): Promise<string[][]>;
  reverse(ip: string): Promise<string[]>;
}

Independent promise-based DNS resolver instance.

Constructor
constructor(options?: import("node:dns").ResolverOptions);

Construct a promise-based DNS Resolver.

Parameters
NameTypeDescription
options optionalimport("node:dns").ResolverOptionsOptional timeout and retry configuration.
Methods
methodSince v0.0.0-alpha.2
cancel(): void;

Cancel all outstanding DNS queries on this resolver.

Returns
void
methodSince v0.0.0-alpha.2
getServers(): string[];

Return the list of configured DNS server IP addresses.

Returns
string[]
methodSince v0.0.0-alpha.2
setServers(servers: readonly string[]): void;

Set the DNS server IP addresses used by this resolver.

Parameters
NameTypeDescription
serversreadonly string[]—
Returns
void
methodSince v0.0.0-alpha.2
setLocalAddress(ipv4?: string, ipv6?: string): void;

Set local source IPv4/IPv6 addresses for outgoing DNS queries.

Parameters
NameTypeDescription
ipv4 optionalstring—
ipv6 optionalstring—
Returns
void
methodSince v0.0.0-alpha.2
resolve(hostname: string, rrtype?: string): Promise<unknown>;

Resolve DNS records of rrtype (default "A") for hostname.

Parameters
NameTypeDescription
hostnamestring—
rrtype optionalstring—
Returns
Promise<unknown>
methodSince v0.0.0-alpha.2
resolve4(hostname: string): Promise<string[]>;
resolve4(
  hostname: string,
  options: import("node:dns").ResolveOptions & { ttl: true },
): Promise<import("node:dns").RecordWithTtl[]>;
resolve4(
  hostname: string,
  options?: import("node:dns").ResolveOptions,
): Promise<string[] | import("node:dns").RecordWithTtl[]>;

Resolve IPv4 (A) records for hostname.

Resolve IPv4 (A) records with TTL metadata when options.ttl is true.

Resolve IPv4 (A) records with options for hostname.

Parameters
NameTypeDescription
hostnamestring—
options optionalimport("node:dns").ResolveOptions & { ttl: true } | import("node:dns").ResolveOptions—
Returns
  • Promise<string[]>
  • Promise<import("node:dns").RecordWithTtl[]>
  • Promise<string[] | import("node:dns").RecordWithTtl[]>
methodSince v0.0.0-alpha.2
resolve6(hostname: string): Promise<string[]>;
resolve6(
  hostname: string,
  options: import("node:dns").ResolveOptions & { ttl: true },
): Promise<import("node:dns").RecordWithTtl[]>;
resolve6(
  hostname: string,
  options?: import("node:dns").ResolveOptions,
): Promise<string[] | import("node:dns").RecordWithTtl[]>;

Resolve IPv6 (AAAA) records for hostname.

Resolve IPv6 (AAAA) records with TTL metadata when options.ttl is true.

Resolve IPv6 (AAAA) records with options for hostname.

Parameters
NameTypeDescription
hostnamestring—
options optionalimport("node:dns").ResolveOptions & { ttl: true } | import("node:dns").ResolveOptions—
Returns
  • Promise<string[]>
  • Promise<import("node:dns").RecordWithTtl[]>
  • Promise<string[] | import("node:dns").RecordWithTtl[]>
methodSince v0.0.0-alpha.2
resolveAny(hostname: string): Promise<import("node:dns").AnyRecord[]>;

Resolve ANY records for hostname.

Parameters
NameTypeDescription
hostnamestring—
Returns
Promise<import("node:dns").AnyRecord[]>
methodSince v0.0.0-alpha.2
resolveCname(hostname: string): Promise<string[]>;

Resolve CNAME records for hostname.

Parameters
NameTypeDescription
hostnamestring—
Returns
Promise<string[]>
methodSince v0.0.0-alpha.2
resolveMx(hostname: string): Promise<import("node:dns").MxRecord[]>;

Resolve MX records for hostname.

Parameters
NameTypeDescription
hostnamestring—
Returns
Promise<import("node:dns").MxRecord[]>
methodSince v0.0.0-alpha.2
resolveNaptr(hostname: string): Promise<import("node:dns").NaptrRecord[]>;

Resolve NAPTR records for hostname.

Parameters
NameTypeDescription
hostnamestring—
Returns
Promise<import("node:dns").NaptrRecord[]>
methodSince v0.0.0-alpha.2
resolveNs(hostname: string): Promise<string[]>;

Resolve NS records for hostname.

Parameters
NameTypeDescription
hostnamestring—
Returns
Promise<string[]>
methodSince v0.0.0-alpha.2
resolvePtr(hostname: string): Promise<string[]>;

Resolve PTR records for hostname.

Parameters
NameTypeDescription
hostnamestring—
Returns
Promise<string[]>
methodSince v0.0.0-alpha.2
resolveSoa(hostname: string): Promise<import("node:dns").SoaRecord>;

Resolve SOA record for hostname.

Parameters
NameTypeDescription
hostnamestring—
Returns
Promise<import("node:dns").SoaRecord>
methodSince v0.0.0-alpha.2
resolveSrv(hostname: string): Promise<import("node:dns").SrvRecord[]>;

Resolve SRV records for hostname.

Parameters
NameTypeDescription
hostnamestring—
Returns
Promise<import("node:dns").SrvRecord[]>
methodSince v0.0.0-alpha.2
resolveTxt(hostname: string): Promise<string[][]>;

Resolve TXT records for hostname.

Parameters
NameTypeDescription
hostnamestring—
Returns
Promise<string[][]>
methodSince v0.0.0-alpha.2
reverse(ip: string): Promise<string[]>;

Reverse-resolve IP address ip to hostnames.

Parameters
NameTypeDescription
ipstring—
Returns
Promise<string[]>
constSince v0.0.0-alpha.2vjs only
export const ADDRCONFIG: number;

getaddrinfo hint flag limiting results to configured address families.

constSince v0.0.0-alpha.2vjs only
export const ALL: number;

getaddrinfo hint flag returning both IPv4-mapped and IPv6 addresses.

constSince v0.0.0-alpha.2vjs only
export const V4MAPPED: number;

getaddrinfo hint flag returning IPv4-mapped IPv6 addresses when no native IPv6 exists.

constSince v0.0.0-alpha.2vjs only
export const BADFAMILY: string;

DNS error code: address family not supported.

constSince v0.0.0-alpha.2vjs only
export const BADFLAGS: string;

DNS error code: invalid flags passed to query.

constSince v0.0.0-alpha.2vjs only
export const BADHINTS: string;

DNS error code: invalid hints value.

constSince v0.0.0-alpha.2vjs only
export const BADNAME: string;

DNS error code: malformed hostname.

constSince v0.0.0-alpha.2vjs only
export const BADQUERY: string;

DNS error code: malformed DNS query.

constSince v0.0.0-alpha.2vjs only
export const BADRESP: string;

DNS error code: malformed DNS reply.

constSince v0.0.0-alpha.2vjs only
export const BADSTR: string;

DNS error code: malformed IP string.

constSince v0.0.0-alpha.2vjs only
export const CANCELLED: string;

DNS error code: query cancelled.

constSince v0.0.0-alpha.2vjs only
export const CONNREFUSED: string;

DNS error code: could not contact DNS servers.

constSince v0.0.0-alpha.2vjs only
export const DESTRUCTION: string;

DNS error code: channel is being destroyed.

constSince v0.0.0-alpha.2vjs only
export const EOF: string;

DNS error code: end of file.

constSince v0.0.0-alpha.2vjs only
export const FILE: string;

DNS error code: error reading configuration file.

constSince v0.0.0-alpha.2vjs only
export const FORMERR: string;

DNS error code: DNS server reports query format error.

constSince v0.0.0-alpha.2vjs only
export const LOADIPHLPAPI: string;

DNS error code: error loading iphlpapi.dll on Windows.

constSince v0.0.0-alpha.2vjs only
export const NODATA: string;

DNS error code: DNS server returned no data.

constSince v0.0.0-alpha.2vjs only
export const NOMEM: string;

DNS error code: out of memory.

constSince v0.0.0-alpha.2vjs only
export const NONAME: string;

DNS error code: non-existent host name.

constSince v0.0.0-alpha.2vjs only
export const NOTFOUND: string;

DNS error code: domain name not found (ENOTFOUND).

constSince v0.0.0-alpha.2vjs only
export const NOTIMP: string;

DNS error code: DNS server does not implement requested operation.

constSince v0.0.0-alpha.2vjs only
export const NOTINITIALIZED: string;

DNS error code: resolver library not initialized.

constSince v0.0.0-alpha.2vjs only
export const REFUSED: string;

DNS error code: DNS server refused query.

constSince v0.0.0-alpha.2vjs only
export const SERVFAIL: string;

DNS error code: DNS server returned general failure.

constSince v0.0.0-alpha.2vjs only
export const TIMEOUT: string;

DNS error code: timeout contacting DNS servers.

constSince v0.0.0-alpha.2vjs only
export const ADDRGETNETWORKPARAMS: string;

DNS error code: error finding network parameters on Windows.

constSince v0.0.0-alpha.2vjs only
export const promises: import("node:dns").DnsPromises;

Self-reference to the node:dns/promises namespace.

defaultSince v0.0.0-alpha.2vjs only
const _default: {
  /** Lookup hint constant `ADDRCONFIG`. @since 0.0.0-alpha.2 */
  readonly ADDRCONFIG: number;
  /** Lookup hint constant `ALL`. @since 0.0.0-alpha.2 */
  readonly ALL: number;
  /** Error constant `BADFAMILY`. @since 0.0.0-alpha.2 */
  readonly BADFAMILY: string;
  /** Error constant `BADFLAGS`. @since 0.0.0-alpha.2 */
  readonly BADFLAGS: string;
  /** Error constant `BADHINTS`. @since 0.0.0-alpha.2 */
  readonly BADHINTS: string;
  /** Error constant `BADNAME`. @since 0.0.0-alpha.2 */
  readonly BADNAME: string;
  /** Error constant `BADQUERY`. @since 0.0.0-alpha.2 */
  readonly BADQUERY: string;
  /** Error constant `BADRESP`. @since 0.0.0-alpha.2 */
  readonly BADRESP: string;
  /** Error constant `BADSTR`. @since 0.0.0-alpha.2 */
  readonly BADSTR: string;
  /** Error constant `CANCELLED`. @since 0.0.0-alpha.2 */
  readonly CANCELLED: string;
  /** Error constant `CONNREFUSED`. @since 0.0.0-alpha.2 */
  readonly CONNREFUSED: string;
  /** Error constant `DESTRUCTION`. @since 0.0.0-alpha.2 */
  readonly DESTRUCTION: string;
  /** Error constant `EOF`. @since 0.0.0-alpha.2 */
  readonly EOF: string;
  /** Error constant `FILE`. @since 0.0.0-alpha.2 */
  readonly FILE: string;
  /** Error constant `FORMERR`. @since 0.0.0-alpha.2 */
  readonly FORMERR: string;
  /** Error constant `LOADIPHLPAPI`. @since 0.0.0-alpha.2 */
  readonly LOADIPHLPAPI: string;
  /** Error constant `NODATA`. @since 0.0.0-alpha.2 */
  readonly NODATA: string;
  /** Error constant `NOMEM`. @since 0.0.0-alpha.2 */
  readonly NOMEM: string;
  /** Error constant `NONAME`. @since 0.0.0-alpha.2 */
  readonly NONAME: string;
  /** Error constant `NOTFOUND`. @since 0.0.0-alpha.2 */
  readonly NOTFOUND: string;
  /** Error constant `NOTIMP`. @since 0.0.0-alpha.2 */
  readonly NOTIMP: string;
  /** Error constant `NOTINITIALIZED`. @since 0.0.0-alpha.2 */
  readonly NOTINITIALIZED: string;
  /** Error constant `REFUSED`. @since 0.0.0-alpha.2 */
  readonly REFUSED: string;
  /** `Resolver` constructor. @since 0.0.0-alpha.2 */
  Resolver: typeof Resolver;
  /** Error constant `SERVFAIL`. @since 0.0.0-alpha.2 */
  readonly SERVFAIL: string;
  /** Error constant `TIMEOUT`. @since 0.0.0-alpha.2 */
  readonly TIMEOUT: string;
  /** Lookup hint constant `V4MAPPED`. @since 0.0.0-alpha.2 */
  readonly V4MAPPED: number;
  /** Error constant `ADDRGETNETWORKPARAMS`. @since 0.0.0-alpha.2 */
  readonly ADDRGETNETWORKPARAMS: string;
  /** Get default `lookup()` result order. @since 0.0.0-alpha.2 */
  getDefaultResultOrder: typeof getDefaultResultOrder;
  /** Get configured DNS servers. @since 0.0.0-alpha.2 */
  getServers: typeof getServers;
  /** Resolve hostname via OS `getaddrinfo`. @since 0.0.0-alpha.2 */
  lookup: typeof lookup;
  /** Reverse-resolve address and port via OS `getnameinfo`. @since 0.0.0-alpha.2 */
  lookupService: typeof lookupService;
  /** Self-reference to `node:dns/promises`. @since 0.0.0-alpha.2 */
  readonly promises: import("node:dns").DnsPromises;
  /** Resolve DNS records by type. @since 0.0.0-alpha.2 */
  resolve: typeof resolve;
  /** Resolve IPv4 (`A`) records. @since 0.0.0-alpha.2 */
  resolve4: typeof resolve4;
  /** Resolve IPv6 (`AAAA`) records. @since 0.0.0-alpha.2 */
  resolve6: typeof resolve6;
  /** Resolve `ANY` records. @since 0.0.0-alpha.2 */
  resolveAny: typeof resolveAny;
  /** Resolve `CNAME` records. @since 0.0.0-alpha.2 */
  resolveCname: typeof resolveCname;
  /** Resolve `MX` records. @since 0.0.0-alpha.2 */
  resolveMx: typeof resolveMx;
  /** Resolve `NAPTR` records. @since 0.0.0-alpha.2 */
  resolveNaptr: typeof resolveNaptr;
  /** Resolve `NS` records. @since 0.0.0-alpha.2 */
  resolveNs: typeof resolveNs;
  /** Resolve `PTR` records. @since 0.0.0-alpha.2 */
  resolvePtr: typeof resolvePtr;
  /** Resolve `SOA` record. @since 0.0.0-alpha.2 */
  resolveSoa: typeof resolveSoa;
  /** Resolve `SRV` records. @since 0.0.0-alpha.2 */
  resolveSrv: typeof resolveSrv;
  /** Resolve `TXT` records. @since 0.0.0-alpha.2 */
  resolveTxt: typeof resolveTxt;
  /** Reverse-resolve IP address to hostnames. @since 0.0.0-alpha.2 */
  reverse: typeof reverse;
  /** Set default `lookup()` result order. @since 0.0.0-alpha.2 */
  setDefaultResultOrder: typeof setDefaultResultOrder;
  /** Configure DNS servers. @since 0.0.0-alpha.2 */
  setServers: typeof setServers;
};
export default _default;

Default export object providing the node:dns/promises API.