1
0
Fork 0
management/front/dkha-web-sz-main/node_modules/address/lib/address.d.ts

29 lines
832 B
TypeScript
Raw Normal View History

2024-01-16 21:26:16 +08:00
export = address;
2023-12-18 13:12:25 +08:00
2024-01-16 21:26:16 +08:00
declare interface Address {
ip: string;
ipv6: string;
mac: string;
2023-12-18 13:12:25 +08:00
}
2024-01-16 21:26:16 +08:00
declare type AddressCallback = (err: Error, addr: Address) => void;
declare type MacCallback = (err: Error, addr: string) => void;
declare type DnsCallback = (err: Error, servers: string[]) => void;
declare function address(interfaceName: string, callback: AddressCallback): void;
declare function address(callback: AddressCallback): void;
declare namespace address {
const MAC_IP_RE: RegExp;
const MAC_RE: RegExp;
2023-12-18 13:12:25 +08:00
2024-01-16 21:26:16 +08:00
function dns(filepath: string, callback: DnsCallback): void;
function dns(callback: DnsCallback): void;
function ip(interfaceName?: string): any;
function ipv6(interfaceName?: string): any;
function mac(interfaceName: string, callback: MacCallback): void;
function mac(callback: MacCallback): void;
}