Skip to main content
Interface.prototype.prompt - node__readline.d.ts - Node documentation
method Interface.prototype.prompt

Usage in Deno

```typescript import { Interface } from "node:node__readline.d.ts"; ```
Interface.prototype.prompt(preserveCursor?: boolean): void
The `rl.prompt()` method writes the `Interface` instances configured`prompt` 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 `Interface` was created with `output` set to `null` or `undefined` the prompt is not written.

Parameters

optional
preserveCursor: boolean
If `true`, prevents the cursor placement from being reset to `0`.

Return Type

void