Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc/api
diff options
context:
space:
mode:
authorAntoine du Hamel <duhamelantoine1995@gmail.com>2021-08-05 21:01:33 +0300
committerAntoine du Hamel <duhamelantoine1995@gmail.com>2021-09-17 00:16:46 +0300
commit341312d78a8b5b4d5ef03429161242dd9d9b9206 (patch)
tree652758a4f6076d03e03e1ebe33cd50ea17a6597b /doc/api
parent707dd77d8636399aefb1cad14a56369a77d4db13 (diff)
readline: add `autoCommit` option
PR-URL: https://github.com/nodejs/node/pull/37947 Fixes: https://github.com/nodejs/node/issues/37287 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Robert Nagy <ronagy@icloud.com>
Diffstat (limited to 'doc/api')
-rw-r--r--doc/api/readline.md16
1 files changed, 11 insertions, 5 deletions
diff --git a/doc/api/readline.md b/doc/api/readline.md
index b886c5b2bb6..cf2cf8a1537 100644
--- a/doc/api/readline.md
+++ b/doc/api/readline.md
@@ -599,12 +599,14 @@ setTimeout(() => ac.abort(), 10000);
added: REPLACEME
-->
-#### `new readlinePromises.Readline(stream)`
+#### `new readlinePromises.Readline(stream[, options])`
<!-- YAML
added: REPLACEME
-->
* `stream` {stream.Writable} A [TTY][] stream.
+* `options` {Object}
+ * `autoCommit` {boolean} If `true`, no need to call `rl.commit()`.
#### `rl.clearLine(dir)`
<!-- YAML
@@ -620,7 +622,8 @@ added: REPLACEME
The `rl.clearLine()` method adds to the internal list of pending action an
action that clears current line of the associated `stream` in a specified
direction identified by `dir`.
-You need to call `rl.commit()` to see the effect of this method.
+Call `rl.commit()` to see the effect of this method, unless `autoCommit: true`
+was passed to the constructor.
#### `rl.clearScreenDown()`
<!-- YAML
@@ -632,7 +635,8 @@ added: REPLACEME
The `rl.clearScreenDown()` method adds to the internal list of pending action an
action that clears the associated stream from the current position of the
cursor down.
-You need to call `rl.commit()` to see the effect of this method.
+Call `rl.commit()` to see the effect of this method, unless `autoCommit: true`
+was passed to the constructor.
#### `rl.commit()`
<!-- YAML
@@ -655,7 +659,8 @@ added: REPLACEME
The `rl.cursorTo()` method adds to the internal list of pending action an action
that moves cursor to the specified position in the associated `stream`.
-You need to call `rl.commit()` to see the effect of this method.
+Call `rl.commit()` to see the effect of this method, unless `autoCommit: true`
+was passed to the constructor.
#### `rl.moveCursor(dx, dy)`
<!-- YAML
@@ -669,7 +674,8 @@ added: REPLACEME
The `rl.moveCursor()` method adds to the internal list of pending action an
action that moves the cursor *relative* to its current position in the
associated `stream`.
-You need to call `rl.commit()` to see the effect of this method.
+Call `rl.commit()` to see the effect of this method, unless `autoCommit: true`
+was passed to the constructor.
#### `rl.rollback()`
<!-- YAML