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

Usage in Deno

```typescript import { promises } from "node:node__dns.d.ts"; ```
resolve4(hostname: string): Promise<string[]>
Uses the DNS protocol to resolve IPv4 addresses (`A` records) for the `hostname`. On success, the `Promise` is resolved with an array of IPv4 addresses (e.g. `['74.125.79.104', '74.125.79.105', '74.125.79.106']`).

Parameters

hostname: string
Host name to resolve.

Return Type

Promise<string[]>
resolve4(
hostname: string,
): Promise<RecordWithTtl[]>

Parameters

hostname: string

Return Type

Promise<RecordWithTtl[]>
resolve4(
hostname: string,
options: ResolveOptions,
): Promise<string[] | RecordWithTtl[]>

Parameters

hostname: string
options: ResolveOptions

Return Type

Promise<string[] | RecordWithTtl[]>