mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-25 06:24:27 +08:00
createInterface accepts history, historySize, removeHistoryDuplicates, completer, tabSize and escapeCodeTimeout, as Node does for a non-terminal interface: tabSize, escapeCodeTimeout and historySize are checked in the constructor's order before the interface opens (ERR_OUT_OF_RANGE and ERR_INVALID_ARG_VALUE with Node's messages), a completer that is not a function throws ERR_INVALID_ARG_VALUE, and the values are kept on the interface. Options may be written as shorthand properties. rl.history answers the history option itself, or the interface's own empty array, and historySize, historyIndex, crlfDelay, tabSize, escapeCodeTimeout, line and terminal read as in Node. 'history' listeners can be registered; without terminal mode Node records no history, so they never fire.