diff options
author | Colin Ihrig <cjihrig@gmail.com> | 2022-11-09 07:29:24 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-09 13:29:24 +0100 |
commit | f946806868ad37624ae96d1b31b882216bb80000 (patch) | |
tree | 83a6bddd2b91dec31b92d2372973a6ac10debe0e /cli/dts/lib.deno.ns.d.ts | |
parent | 9edcab524fef558abce824731e78f83f7aac28dd (diff) |
feat: stabilize Deno.networkInterfaces() (#16451)
Diffstat (limited to 'cli/dts/lib.deno.ns.d.ts')
-rw-r--r-- | cli/dts/lib.deno.ns.d.ts | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/cli/dts/lib.deno.ns.d.ts b/cli/dts/lib.deno.ns.d.ts index 5e13a509f..b64e78af2 100644 --- a/cli/dts/lib.deno.ns.d.ts +++ b/cli/dts/lib.deno.ns.d.ts @@ -332,6 +332,43 @@ declare namespace Deno { */ export function loadavg(): number[]; + /** + * The information for a network interface returned from a call to + * {@linkcode Deno.networkInterfaces}. + * + * @category Network + */ + export interface NetworkInterfaceInfo { + /** The network interface name. */ + name: string; + /** The IP protocol version. */ + family: "IPv4" | "IPv6"; + /** The IP address bound to the interface. */ + address: string; + /** The netmask applied to the interface. */ + netmask: string; + /** The IPv6 scope id or `null`. */ + scopeid: number | null; + /** The CIDR range. */ + cidr: string; + /** The MAC address. */ + mac: string; + } + + /** + * Returns an array of the network interface information. + * + * ```ts + * console.log(Deno.networkInterfaces()); + * ``` + * + * Requires `allow-sys` permission. + * + * @tags allow-sys + * @category Network + */ + export function networkInterfaces(): NetworkInterfaceInfo[]; + /** Reflects the `NO_COLOR` environment variable at program start. * * When the value is `true`, the Deno CLI will attempt to not send color codes |