pausePrompt(server: REPLServer): void
Stops the prompt reading, because what happens next is not the prompt's.
Called before the editor rather than at the handover, so that everything between the command and the editor opening — asking the page where a value is written, most of the time — is time the keyboard belongs to nobody. Lines typed then are lines meant for AFTER the editor, and readline would otherwise run them while it was still up.
import { pausePrompt } from './editor.ts'; import type { REPLServer } from 'node:repl'; // Defined, not invoked: it stops a live prompt. function example(server: REPLServer) { pausePrompt(server); // and `standUp` when whatever it was doing is done }