mirror of
https://github.com/denoland/deno.git
synced 2025-09-27 12:49:10 +00:00
feat(cli): Add Deno.env.delete() (#5859)
This commit is contained in:
parent
44251ce8ea
commit
878f306a39
4 changed files with 39 additions and 0 deletions
10
cli/js/lib.deno.ns.d.ts
vendored
10
cli/js/lib.deno.ns.d.ts
vendored
|
@ -130,6 +130,16 @@ declare namespace Deno {
|
|||
* Requires `allow-env` permission. */
|
||||
set(key: string, value: string): void;
|
||||
|
||||
/** Delete the value of an environment variable.
|
||||
*
|
||||
* ```ts
|
||||
* Deno.env.set("SOME_VAR", "Value"));
|
||||
* Deno.env.delete("SOME_VAR"); // outputs "Undefined"
|
||||
* ```
|
||||
*
|
||||
* Requires `allow-env` permission. */
|
||||
delete(key: string): void;
|
||||
|
||||
/** Returns a snapshot of the environment variables at invocation.
|
||||
*
|
||||
* ```ts
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue