function resolve
Overload 1
#resolve(hostname: string,callback: (err: ErrnoException | null,addresses: string[],) => void,): void
Deno compatibility
The ttl option is not supported.
Uses the DNS protocol to resolve a host name (e.g. 'nodejs.org') into an array
of the resource records. The callback function has arguments (err, records). When successful, records will be an array of resource
records. The type and structure of individual results varies based on rrtype:
On error, err is an Error object,
where err.code is one of the DNS error codes.
Parameters #
Return Type #
void Overload 2
#resolve(hostname: string,rrtype: "A",callback: (err: ErrnoException | null,addresses: string[],) => void,): voidOverload 3
#resolve(hostname: string,rrtype: "AAAA",callback: (err: ErrnoException | null,addresses: string[],) => void,): voidOverload 4
#resolve(hostname: string,rrtype: "ANY",callback: (err: ErrnoException | null,addresses: AnyRecord[],) => void,): voidOverload 5
#resolve(hostname: string,rrtype: "CNAME",callback: (err: ErrnoException | null,addresses: string[],) => void,): voidOverload 6
#resolve(hostname: string,rrtype: "MX",callback: (err: ErrnoException | null,addresses: MxRecord[],) => void,): voidOverload 7
#resolve(hostname: string,rrtype: "NAPTR",callback: (err: ErrnoException | null,addresses: NaptrRecord[],) => void,): voidOverload 8
#resolve(hostname: string,rrtype: "NS",callback: (err: ErrnoException | null,addresses: string[],) => void,): voidOverload 9
#resolve(hostname: string,rrtype: "PTR",callback: (err: ErrnoException | null,addresses: string[],) => void,): voidOverload 10
#resolve(hostname: string,rrtype: "SOA",callback: (err: ErrnoException | null,addresses: SoaRecord,) => void,): voidOverload 11
#resolve(hostname: string,rrtype: "SRV",callback: (err: ErrnoException | null,addresses: SrvRecord[],) => void,): voidOverload 12
#resolve(hostname: string,rrtype: "TXT",callback: (err: ErrnoException | null,addresses: string[][],) => void,): voidOverload 13
#resolve(hostname: string,rrtype: string,callback: (err: ErrnoException | null,addresses: ,) => void,): void