resumePrompt(server: REPLServer): void
Gives the prompt back its input — unless the session has gone.
A command can outlive the session that started it: .exit on the line after an .open arrives
while the editor is still up, and readline throws ERR_USE_AFTER_CLOSE at whoever asks it for
anything afterwards. Out of a finally, that takes the process with it.
import { resumePrompt } from './editor.ts'; import type { REPLServer } from 'node:repl'; // Defined, not invoked: it resumes a live prompt. function example(server: REPLServer) { resumePrompt(server); // a no-op where there is no longer a prompt to resume }