From b8364a263694e9845a4ad03fac53fb913667f63a Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Sat, 9 May 2020 12:44:35 -0400 Subject: BREAKING: make Deno.hostname unstable (#5108) --- cli/js/lib.deno.unstable.d.ts | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'cli/js/lib.deno.unstable.d.ts') diff --git a/cli/js/lib.deno.unstable.d.ts b/cli/js/lib.deno.unstable.d.ts index a523300cc..10587d3df 100644 --- a/cli/js/lib.deno.unstable.d.ts +++ b/cli/js/lib.deno.unstable.d.ts @@ -1174,4 +1174,12 @@ declare namespace Deno { state: PermissionState; constructor(state: PermissionState); } + + /** Get the `hostname` of the machine the Deno process is running on. + * + * console.log(Deno.hostname()); + * + * Requires `allow-env` permission. + */ + export function hostname(): string; } -- cgit v1.2.3