_ReadLineOptions

sealed external interface _ReadLineOptions(source)

Inheritors

Properties

Link copied to clipboard
abstract var completer: Any?

An optional function used for Tab autocompletion.

Link copied to clipboard
abstract var crlfDelay: Double?

If the delay between \r and \n exceeds crlfDelay milliseconds, both \r and \n will be treated as separate end-of-line input. crlfDelay will be coerced to a number no less than 100. It can be set to Infinity, in which case \r followed by \n will always be considered a single newline (which may be reasonable for reading files with \r\n line delimiter).

Link copied to clipboard
abstract var escapeCodeTimeout: Double?

The duration readline will wait for a character (when reading an ambiguous key sequence in milliseconds one that can both form a complete key sequence using the input read so far and can take additional input to complete a longer key sequence).

Link copied to clipboard
abstract var history: <Error class: unknown class><String>?

Initial list of history lines. This option makes sense only if terminal is set to true by the user or by an internal output check, otherwise the history caching mechanism is not initialized at all.

Link copied to clipboard
abstract var historySize: Double?

Maximum number of history lines retained. To disable the history set this value to 0. This option makes sense only if terminal is set to true by the user or by an internal output check, otherwise the history caching mechanism is not initialized at all.

Link copied to clipboard
abstract var input: ReadableStream

The Readable stream to listen to

Link copied to clipboard
abstract var output: WritableStream?

The Writable stream to write readline data to.

Link copied to clipboard
abstract var prompt: String?

The prompt string to use.

Link copied to clipboard

If true, when a new input line added to the history list duplicates an older one, this removes the older line from the list.

Link copied to clipboard
abstract var signal: <Error class: unknown class>?

Allows closing the interface using an AbortSignal. Aborting the signal will internally call close on the interface.

Link copied to clipboard
abstract var tabSize: Double?

The number of spaces a tab is equal to (minimum 1).

Link copied to clipboard
abstract var terminal: Boolean?

true if the input and output streams should be treated like a TTY, and have ANSI/VT100 escape codes written to it. Default: checking isTTY on the output stream upon instantiation.