Merge pull request #7556 from chrootsu/node-tty

node: definition of the module "tty" has been changed
This commit is contained in:
Masahiro Wakame
2016-01-11 15:45:44 +09:00
2 changed files with 21 additions and 1 deletions
+19 -1
View File
@@ -9,6 +9,7 @@ import * as crypto from "crypto";
import * as tls from "tls";
import * as http from "http";
import * as net from "net";
import * as tty from "tty";
import * as dgram from "dgram";
import * as querystring from "querystring";
import * as path from "path";
@@ -281,7 +282,7 @@ module http_tests {
});
var agent: http.Agent = http.globalAgent;
http.request({
agent: false
});
@@ -293,6 +294,23 @@ module http_tests {
});
}
////////////////////////////////////////////////////
/// TTY tests : http://nodejs.org/api/tty.html
////////////////////////////////////////////////////
module tty_tests {
let rs: tty.ReadStream;
let ws: tty.WriteStream;
let rsIsRaw: boolean = rs.isRaw;
rs.setRawMode(true);
let wsColumns: number = ws.columns;
let wsRows: number = ws.rows;
let isTTY: boolean = tty.isatty(1);
}
////////////////////////////////////////////////////
/// Dgram tests : http://nodejs.org/api/dgram.html
////////////////////////////////////////////////////
+2
View File
@@ -1909,10 +1909,12 @@ declare module "tty" {
export interface ReadStream extends net.Socket {
isRaw: boolean;
setRawMode(mode: boolean): void;
isTTY: boolean;
}
export interface WriteStream extends net.Socket {
columns: number;
rows: number;
isTTY: boolean;
}
}