summaryrefslogtreecommitdiff
path: root/cli/tsc/dts/lib.deno.ns.d.ts
diff options
context:
space:
mode:
authorLeo Kettmeir <crowlkats@toaxl.com>2023-01-09 20:19:55 +0100
committerGitHub <noreply@github.com>2023-01-09 20:19:55 +0100
commite6c49d14b1ea6331d2e13f7a0b74a0e41c142596 (patch)
treed045ba357a4fe37c1bb9d9b7596d3c69085d8233 /cli/tsc/dts/lib.deno.ns.d.ts
parentfa175d8cdaeff37daa68cadea5b0e59fa794a0c2 (diff)
feat(runtime/os): add `Deno.env.has()` (#17315)
Diffstat (limited to 'cli/tsc/dts/lib.deno.ns.d.ts')
-rw-r--r--cli/tsc/dts/lib.deno.ns.d.ts13
1 files changed, 13 insertions, 0 deletions
diff --git a/cli/tsc/dts/lib.deno.ns.d.ts b/cli/tsc/dts/lib.deno.ns.d.ts
index ab53a064e..5941a5d57 100644
--- a/cli/tsc/dts/lib.deno.ns.d.ts
+++ b/cli/tsc/dts/lib.deno.ns.d.ts
@@ -1231,6 +1231,19 @@ declare namespace Deno {
*/
delete(key: string): void;
+ /** Check whether an environment variable is present or not.
+ *
+ * ```ts
+ * Deno.env.set("SOME_VAR", "Value");
+ * Deno.env.has("SOME_VAR"); // outputs true
+ * ```
+ *
+ * Requires `allow-env` permission.
+ *
+ * @tags allow-env
+ */
+ has(key: string): boolean;
+
/** Returns a snapshot of the environment variables at invocation as a
* simple object of keys and values.
*