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.
class Interface
import { Interface } from "https://deno.land/std@0.142.0/node/internal/readline/interface.mjs";

Constructors

new
Interface(
input,
output,
completer,
terminal,
)

Properties

readonly
columns

Methods

Closes the readline.Interface instance.

Returns the real position of the cursor in relation to the input prompt + string.

Returns the current prompt used by rl.prompt().

Pauses the input stream.

prompt(preserveCursor)

Writes the configured prompt to a new line in output.

question(query, cb)

Resumes the input stream if paused.

setPrompt(prompt)

Sets the prompt written to the output.

write(d, key)

Writes either data or a key sequence identified by key to the output.

[kOnLine](line)
[kTabComplete](lastKeypressWasTab)
[kTabCompleter](lastKeypressWasTab, unnamed 1)
[kTtyWrite](s, key)
[kWriteToOutput](stringToWrite)

Creates an AsyncIterator object that iterates through each line in the input stream as a string.