Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

std/node/_readline.d.ts

Deno standard library
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
import * as mod from "https://deno.land/std@0.118.0/node/_readline.d.ts";

Classes

Instances of the readline.Interface class are constructed using thereadline.createInterface() method. Every instance is associated with a single input Readable stream and a single output Writable stream. The output stream is used to print prompts for user input that arrives on, and is read from, the input stream.

Functions

The readline.clearLine() method clears current line of given TTY stream in a specified direction identified by dir.

The readline.clearScreenDown() method clears the given TTY stream from the current position of the cursor down.

The readline.createInterface() method creates a new readline.Interfaceinstance.

The readline.cursorTo() method moves cursor to the specified position in a given TTY stream.

The readline.emitKeypressEvents() method causes the given Readable stream to begin emitting 'keypress' events corresponding to received input.

The readline.moveCursor() method moves the cursor relative to its current position in a given TTY stream.

Interfaces

The readline module provides an interface for reading data from a Readable stream (such as process.stdin) one line at a time. It can be accessed using: