mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-07 16:30:12 +08:00
Merge pull request #7556 from chrootsu/node-tty
node: definition of the module "tty" has been changed
This commit is contained in:
+19
-1
@@ -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
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
Vendored
+2
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user