summaryrefslogtreecommitdiff
path: root/js/lib.deno_runtime.d.ts
diff options
context:
space:
mode:
authorKevin (Kun) "Kassimo" Qian <kevinkassimo@gmail.com>2019-09-27 16:09:42 -0700
committerRyan Dahl <ry@tinyclouds.org>2019-09-27 19:09:42 -0400
commit6efca6d1a17638136eadf39644f392f9107a4a6c (patch)
tree6aedab40214d21396122a97b4e6335a0f084a079 /js/lib.deno_runtime.d.ts
parentd36391ad20afe56aaa6e42fd63597221636fdfcb (diff)
Add Deno.hostname() (#3032)
Diffstat (limited to 'js/lib.deno_runtime.d.ts')
-rw-r--r--js/lib.deno_runtime.d.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/js/lib.deno_runtime.d.ts b/js/lib.deno_runtime.d.ts
index 36e49c9c2..8eb46b410 100644
--- a/js/lib.deno_runtime.d.ts
+++ b/js/lib.deno_runtime.d.ts
@@ -22,6 +22,12 @@ declare namespace Deno {
stdout: boolean;
stderr: boolean;
};
+ /** Get the hostname.
+ * Requires the `--allow-env` flag.
+ *
+ * console.log(Deno.hostname());
+ */
+ export function hostname(): string;
/** Exit the Deno process with optional exit code. */
export function exit(code?: number): never;
/** Returns a snapshot of the environment variables at invocation. Mutating a