summaryrefslogtreecommitdiff
path: root/js/os.ts
diff options
context:
space:
mode:
authorKitson Kelly <me@kitsonkelly.com>2018-10-15 07:29:50 +1100
committerRyan Dahl <ry@tinyclouds.org>2018-10-14 17:38:23 -0400
commit10a97679ac80b4304c75d33cbc59c5736d11deb1 (patch)
treeb51b9183ed251f61373069e5c4d35e39603bedb2 /js/os.ts
parent1840a1971317f5b8fc6e322b3a414b7f8a593c88 (diff)
Align JSDoc to style guide.
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