dnsResolve.d.ts 397 B

123456789101112131415
  1. /**
  2. * Resolves the given DNS hostname into an IP address, and returns it in the dot
  3. * separated format as a string.
  4. *
  5. * Example:
  6. *
  7. * ``` js
  8. * dnsResolve("home.netscape.com")
  9. * // returns the string "198.95.249.79".
  10. * ```
  11. *
  12. * @param {String} host hostname to resolve
  13. * @return {String} resolved IP address
  14. */
  15. export default function dnsResolve(host: string): Promise<string | null>;