summaryrefslogtreecommitdiff
path: root/cli/js/repl.ts
diff options
context:
space:
mode:
authorKitson Kelly <me@kitsonkelly.com>2020-03-29 04:03:49 +1100
committerGitHub <noreply@github.com>2020-03-28 13:03:49 -0400
commitbced52505f32d6cca4f944bb610a8a26767908a8 (patch)
treeda49a5df4b7bd6f8306248069228cd6bd0db1303 /cli/js/repl.ts
parent1397b8e0e7c85762e19d88fde103342bfa563360 (diff)
Update to Prettier 2 and use ES Private Fields (#4498)
Diffstat (limited to 'cli/js/repl.ts')
-rw-r--r--cli/js/repl.ts18
1 files changed, 9 insertions, 9 deletions
diff --git a/cli/js/repl.ts b/cli/js/repl.ts
index f1b0723c8..044713678 100644
--- a/cli/js/repl.ts
+++ b/cli/js/repl.ts
@@ -17,20 +17,20 @@ const helpMsg = [
"_ Get last evaluation result",
"_error Get last thrown error",
"exit Exit the REPL",
- "help Print this help message"
+ "help Print this help message",
].join("\n");
const replCommands = {
exit: {
get(): void {
exit(0);
- }
+ },
},
help: {
get(): string {
return helpMsg;
- }
- }
+ },
+ },
};
// Error messages that allow users to continue input
@@ -42,7 +42,7 @@ const recoverableErrorMessages = [
"Missing initializer in const declaration", // const a
"Missing catch or finally after try", // try {}
"missing ) after argument list", // console.log(1
- "Unterminated template literal" // `template
+ "Unterminated template literal", // `template
// TODO(kevinkassimo): need a parser to handling errors such as:
// "Missing } in template expression" // `${ or `${ a 123 }`
];
@@ -105,10 +105,10 @@ export async function replLoop(): Promise<void> {
value: value,
writable: true,
enumerable: true,
- configurable: true
+ configurable: true,
});
console.log("Last evaluation result is no longer saved to _.");
- }
+ },
});
// Configure globalThis._error to give the last thrown error.
@@ -120,10 +120,10 @@ export async function replLoop(): Promise<void> {
value: value,
writable: true,
enumerable: true,
- configurable: true
+ configurable: true,
});
console.log("Last thrown error is no longer saved to _error.");
- }
+ },
});
while (true) {