import { DNS } from '@awesome-cordova-plugins/dns/ngx';
constructor(private dns: DNS) { }
...
this.dns.resolve(hostname)
  .then(
    address => console.log('Resolved ' + hostname + ' to ' + address),
    error => console.log('Failed to resolve ' + hostname + ': ' + error)
  );