Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/deno/cli/tsc/dts/lib.deno.ns.d.ts>Deno.ResolveDnsOptions

A modern runtime for JavaScript and TypeScript.
Latest
interface Deno.ResolveDnsOptions
import { type Deno } from "https://deno.land/x/deno@v2.0.4/cli/tsc/dts/lib.deno.ns.d.ts";
const { ResolveDnsOptions } = Deno;

Options which can be set when using Deno.resolveDns.

Properties

optional
nameServer: { ipAddr: string; port?: number; }

The name server to be used for lookups.

If not specified, defaults to the system configuration. For example /etc/resolv.conf on Unix-like systems.

optional
signal: AbortSignal

An abort signal to allow cancellation of the DNS resolution operation. If the signal becomes aborted the resolveDns operation will be stopped and the promise returned will be rejected with an AbortError.