summaryrefslogtreecommitdiff
path: root/cli/js/ops/repl.ts
blob: 1781aa08931ade74ea1b67ab255a9549963364eb (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 function readline(rid: number, prompt: string): Promise<string> {
  return sendAsync("op_repl_readline", { rid, prompt });
}