Skip to main content
Deno 2 is finally here 🎉️
Learn more
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
method Interface.prototype.prompt
Re-export
import { Interface } from "https://deno.land/std@0.153.0/node/readline.ts";

The rl.prompt() method writes the readline.Interface instances configuredprompt to a new line in output in order to provide a user with a new location at which to provide input.

When called, rl.prompt() will resume the input stream if it has been paused.

If the readline.Interface was created with output set to null orundefined the prompt is not written.

Parameters

optional
preserveCursor: boolean

If true, prevents the cursor placement from being reset to 0.