diff options
author | cjihrig <cjihrig@gmail.com> | 2019-07-11 12:35:34 -0400 |
---|---|---|
committer | Michaël Zasso <targos@protonmail.com> | 2019-07-20 11:10:25 +0200 |
commit | 17df75f5c961bfbaddf8f18359ccc7d18092c5c2 (patch) | |
tree | fe67e6b8977747cde9eb33a223979972c6eb5c1d /doc | |
parent | 3f65b91eb93ed4d1dfaf82086e5a42f0e75c3bf6 (diff) | |
download | android-node-v8-17df75f5c961bfbaddf8f18359ccc7d18092c5c2.tar.gz android-node-v8-17df75f5c961bfbaddf8f18359ccc7d18092c5c2.tar.bz2 android-node-v8-17df75f5c961bfbaddf8f18359ccc7d18092c5c2.zip |
readline: expose stream API in clearScreenDown()
This commit adds an optional callback to clearScreenDown(),
which is passed to the stream's write() method. It also
exposes the return value of write().
PR-URL: https://github.com/nodejs/node/pull/28641
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/api/readline.md | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/doc/api/readline.md b/doc/api/readline.md index 8f372a8473..b295ace5b3 100644 --- a/doc/api/readline.md +++ b/doc/api/readline.md @@ -360,12 +360,20 @@ added: v0.7.7 The `readline.clearLine()` method clears current line of given [TTY][] stream in a specified direction identified by `dir`. -## readline.clearScreenDown(stream) +## readline.clearScreenDown(stream[, callback]) <!-- YAML added: v0.7.7 +changes: + - version: REPLACEME + pr-url: https://github.com/nodejs/node/pull/28641 + description: The stream's write() callback and return value are exposed. --> * `stream` {stream.Writable} +* `callback` {Function} Invoked once the operation completes. +* Returns: {boolean} `false` if `stream` wishes for the calling code to wait for + the `'drain'` event to be emitted before continuing to write additional data; + otherwise `true`. The `readline.clearScreenDown()` method clears the given [TTY][] stream from the current position of the cursor down. |