address.d.ts 691 B

1234567891011121314151617
  1. namespace address {
  2. function ip(interfaceName?: string): string
  3. function ipv6(interfaceName?: string): string
  4. function mac(callback: (err: Error, addr: string) => void): void
  5. function mac(interfaceName: string, callback: (err: Error, addr: string) => void): void
  6. function dns(callback: (err: Error, servers: string[]) => void): void
  7. function dns(filePath: string, callback: (err: Error, servers: string[]) => void): void
  8. }
  9. function address(callback: (err: Error, addr: { ip: string, ipv6: string, mac: string }) => void): void
  10. function address(interfaceName: string, callback: (err: Error, addr: { ip: string, ipv6: string, mac: string }) => void): void
  11. export = address