import { History } from "./history.js"; import { Program } from "./program.js"; /** * Create new REPL instance. */ export declare function repl(program: Program): Repl; export declare class Repl { private program; private server?; private history?; private autocompleter; private successHandler; private errorHandler; constructor(program: Program); attachHistory(history: History): void; /** * Start the REPL server. This method may change at any time, not * intended for public use. * * @private */ start(): Promise; stop(): void; /** * Emulates promise.then, but saves the callback instead to be executed on * each command which resolves. */ then(cb: (value?: unknown) => void): this; /** * Emulates promise.catch, but saves the callback instead to be executed on * each command which rejects. */ catch(cb: (reason?: any) => void): this; /** * Invokes the autocompleter and passes results to the REPL server. */ private completer; /** * Uses the bandersnatch program to run commands received by the REPL server. */ private eval; }