Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions lib/tty.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

'use strict';

const { inherits } = require('util');
const net = require('net');
const { TTY, isTTY } = internalBinding('tty_wrap');
const errors = require('internal/errors');
Expand Down Expand Up @@ -61,7 +60,7 @@ function ReadStream(fd, options) {
this.isRaw = false;
this.isTTY = true;
}
inherits(ReadStream, net.Socket);
Object.setPrototypeOf(ReadStream.prototype, net.Socket.prototype);
Comment thread
ZYSzys marked this conversation as resolved.

ReadStream.prototype.setRawMode = function(flag) {
flag = !!flag;
Expand Down Expand Up @@ -106,7 +105,7 @@ function WriteStream(fd) {
this.rows = winSize[1];
}
}
inherits(WriteStream, net.Socket);
Object.setPrototypeOf(WriteStream.prototype, net.Socket.prototype);
Comment thread
ZYSzys marked this conversation as resolved.

WriteStream.prototype.isTTY = true;

Expand Down