summaryrefslogtreecommitdiff
path: root/cli/js/ops/repl.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/js/ops/repl.ts')
-rw-r--r--cli/js/ops/repl.ts11
1 files changed, 11 insertions, 0 deletions
diff --git a/cli/js/ops/repl.ts b/cli/js/ops/repl.ts
new file mode 100644
index 000000000..3f40f4456
--- /dev/null
+++ b/cli/js/ops/repl.ts
@@ -0,0 +1,11 @@
+// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
+
+import { sendSync, sendAsync } from "./dispatch_json.ts";
+
+export function startRepl(historyFile: string): number {
+ return sendSync("op_repl_start", { historyFile });
+}
+
+export async function readline(rid: number, prompt: string): Promise<string> {
+ return sendAsync("op_repl_readline", { rid, prompt });
+}