node: signatures of module "os" have been changed

This commit is contained in:
Ilya Mochalov
2015-12-05 16:37:35 +05:00
parent e5a27ea95e
commit d2e216ec4f
2 changed files with 71 additions and 2 deletions
+47
View File
@@ -14,6 +14,7 @@ import * as querystring from "querystring";
import * as path from "path";
import * as readline from "readline";
import * as childProcess from "child_process";
import * as os from "os";
assert(1 + 1 - 2 === 0, "The universe isn't how it should.");
@@ -411,3 +412,49 @@ rl.question("do you like typescript?", function(answer: string) {
childProcess.exec("echo test");
childProcess.spawnSync("echo test");
////////////////////////////////////////////////////
/// os tests : https://nodejs.org/api/os.html
////////////////////////////////////////////////////
module os_tests {
{
let result: string;
result = os.tmpdir();
result = os.homedir();
result = os.endianness();
result = os.hostname();
result = os.type();
result = os.platform();
result = os.arch();
result = os.release();
result = os.EOL;
}
{
let result: number;
result = os.uptime();
result = os.totalmem();
result = os.freemem();
}
{
let result: number[];
result = os.loadavg();
}
{
let result: os.CpuInfo[];
result = os.cpus();
}
{
let result: {[index: string]: os.NetworkInterfaceInfo[]};
result = os.networkInterfaces();
}
}