summaryrefslogtreecommitdiff
path: root/js/os.ts
diff options
context:
space:
mode:
Diffstat (limited to 'js/os.ts')
-rw-r--r--js/os.ts17
1 files changed, 9 insertions, 8 deletions
diff --git a/js/os.ts b/js/os.ts
index 092884090..7d9d16311 100644
--- a/js/os.ts
+++ b/js/os.ts
@@ -6,6 +6,7 @@ import * as util from "./util";
import { flatbuffers } from "flatbuffers";
import { sendSync } from "./dispatch";
+/** Exit the Deno process with optional exit code. */
export function exit(exitCode = 0): never {
const builder = new flatbuffers.Builder();
msg.Exit.startExit(builder);
@@ -93,18 +94,18 @@ function setEnv(key: string, value: string): void {
sendSync(builder, msg.Any.SetEnv, inner);
}
-/**
- * Returns a snapshot of the environment variables at invocation. Mutating a
+/** Returns a snapshot of the environment variables at invocation. Mutating a
* property in the object will set that variable in the environment for
* the process. The environment object will only accept `string`s or `number`s
* as values.
- * import { env } from "deno";
*
- * const myEnv = env();
- * console.log(myEnv.SHELL);
- * myEnv.TEST_VAR = "HELLO";
- * const newEnv = env();
- * console.log(myEnv.TEST_VAR == newEnv.TEST_VAR);
+ * import { env } from "deno";
+ *
+ * const myEnv = env();
+ * console.log(myEnv.SHELL);
+ * myEnv.TEST_VAR = "HELLO";
+ * const newEnv = env();
+ * console.log(myEnv.TEST_VAR == newEnv.TEST_VAR);
*/
export function env(): { [index: string]: string } {
/* Ideally we could write