温馨提示:本站仅提供公开网络链接索引服务,不存储、不篡改任何第三方内容,所有内容版权归原作者所有
AI智能索引来源:http://www.bun.com/reference/node/readline/ReadLineOptions
点击访问原文链接

Node readline.ReadLineOptions TypeScript interface | API Reference | Bun

Node readline.ReadLineOptions TypeScript interface | API Reference | BunBuildDocsReferenceGuidesBlogDiscord/node:readline/ReadLineOptionsPcompleterPcrlfDelayPescapeCodeTimeoutPhistoryPhistorySizePinputPoutputPpromptPremoveHistoryDuplicatesPsignalPtabSizePterminal

Search the reference...

/

BuildDocsReferenceGuidesBlogDiscord/node:readline/ReadLineOptionsPcompleterPcrlfDelayPescapeCodeTimeoutPhistoryPhistorySizePinputPoutputPpromptPremoveHistoryDuplicatesPsignalPtabSizePterminal

interface

readline.ReadLineOptionsinterface ReadLineOptionscompleter?: Completer | AsyncCompleter

An optional function used for Tab autocompletion.

crlfDelay?: number

If the delay between \r and


exceeds crlfDelay milliseconds, both \r and

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

will always be considered a single newline (which may be reasonable for reading files with
\r
line delimiter).

escapeCodeTimeout?: number

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).

history?: 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.

historySize?: number

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.

input: ReadableStreamoutput?: WritableStream

The Writable stream to write readline data to.

prompt?: string

The prompt string to use.

removeHistoryDuplicates?: boolean

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

signal?: AbortSignal

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

tabSize?: number

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

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.

Resources

ReferenceDocsGuidesDiscordMerch StoreGitHubBlog 

Toolkit

RuntimePackage managerTest runnerBundlerPackage runner

Project

Bun 1.0Bun 1.1Bun 1.2Bun 1.3RoadmapContributingLicense

Baked with ❤️ in San Francisco

We're hiring →

Node readline.ReadLineOptions TypeScript interface | API Reference | Bun,AI智能索引,全网链接索引,智能导航,网页索引

    API documentation for interface node:readline.ReadLineOptions | Bun