summaryrefslogtreecommitdiff
path: root/cli/js/ops/repl.ts
blob: 3f40f445611558976b087a3fa330a25e485aa306 (plain)
1
2
3
4
5
6
7
8
9
10
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 });
}