mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
node: Add scopeid for IPv6 interfaces
The scopeid field only exists if the interface is of family IPv6 https://nodejs.org/dist/latest-v6.x/docs/api/os.html#os_os_networkinterfaces
This commit is contained in:
Vendored
+13
-2
@@ -1379,14 +1379,25 @@ declare module "os" {
|
||||
};
|
||||
}
|
||||
|
||||
export interface NetworkInterfaceInfo {
|
||||
export interface NetworkInterfaceInfoIPv4 {
|
||||
address: string;
|
||||
netmask: string;
|
||||
family: string;
|
||||
family: "IPv4";
|
||||
mac: string;
|
||||
internal: boolean;
|
||||
}
|
||||
|
||||
export interface NetworkInterfaceInfoIPv6 {
|
||||
address: string;
|
||||
netmask: string;
|
||||
family: "IPv6";
|
||||
mac: string;
|
||||
internal: boolean;
|
||||
scopeid: number;
|
||||
}
|
||||
|
||||
export type NetworkInterfaceInfo = NetworkInterfaceInfoIPv4 | NetworkInterfaceInfoIPv6;
|
||||
|
||||
export function hostname(): string;
|
||||
export function loadavg(): number[];
|
||||
export function uptime(): number;
|
||||
|
||||
Reference in New Issue
Block a user