summaryrefslogtreecommitdiff
path: root/lib/tty.js
diff options
context:
space:
mode:
authorcjihrig <cjihrig@gmail.com>2019-07-16 11:46:59 -0400
committerMichaƫl Zasso <targos@protonmail.com>2019-07-20 11:29:58 +0200
commit487a417dd1b515ce32745e59ef01fd206576c9ca (patch)
treeb2fbe5d2b386b4f245cad520126ebfe98b9de420 /lib/tty.js
parent88809a49f66e4e494d4e2c6565284d1e4a247bf2 (diff)
downloadandroid-node-v8-487a417dd1b515ce32745e59ef01fd206576c9ca.tar.gz
android-node-v8-487a417dd1b515ce32745e59ef01fd206576c9ca.tar.bz2
android-node-v8-487a417dd1b515ce32745e59ef01fd206576c9ca.zip
tty: expose stream API from readline methods
This commit exposes the return value and callback of the underlying readline APIs from the tty module. PR-URL: https://github.com/nodejs/node/pull/28721 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Diffstat (limited to 'lib/tty.js')
-rw-r--r--lib/tty.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/tty.js b/lib/tty.js
index 9e7d7dbb31..cc22a3b499 100644
--- a/lib/tty.js
+++ b/lib/tty.js
@@ -137,21 +137,21 @@ WriteStream.prototype._refreshSize = function() {
};
// Backwards-compat
-WriteStream.prototype.cursorTo = function(x, y) {
+WriteStream.prototype.cursorTo = function(x, y, callback) {
if (readline === undefined) readline = require('readline');
- readline.cursorTo(this, x, y);
+ return readline.cursorTo(this, x, y, callback);
};
-WriteStream.prototype.moveCursor = function(dx, dy) {
+WriteStream.prototype.moveCursor = function(dx, dy, callback) {
if (readline === undefined) readline = require('readline');
- readline.moveCursor(this, dx, dy);
+ return readline.moveCursor(this, dx, dy, callback);
};
-WriteStream.prototype.clearLine = function(dir) {
+WriteStream.prototype.clearLine = function(dir, callback) {
if (readline === undefined) readline = require('readline');
- readline.clearLine(this, dir);
+ return readline.clearLine(this, dir, callback);
};
-WriteStream.prototype.clearScreenDown = function() {
+WriteStream.prototype.clearScreenDown = function(callback) {
if (readline === undefined) readline = require('readline');
- readline.clearScreenDown(this);
+ return readline.clearScreenDown(this, callback);
};
WriteStream.prototype.getWindowSize = function() {
return [this.columns, this.rows];