feat(cli): Add Deno.env.delete() (#5859)

This commit is contained in:
Tuan Le 2020-06-09 08:58:30 -04:00 committed by GitHub
parent 44251ce8ea
commit 878f306a39
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 39 additions and 0 deletions

View file

@ -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