function
dns.resolve
hostname: string,
rrtype?: Type
Ask the name servers for the records of hostname
The code of an error is that of node:dns with DNS_ in front, such as "DNS_ENOTFOUND".
@param hostname
The name to ask for
@param rrtype
The record type. Default is "A".
import { dns } from 'bun';
console.log(await dns.resolve('example.com', 'MX'));
// [{ exchange: "mail.example.com", priority: 10 }]