diff --git a/dist/beautylog.node.js b/dist/beautylog.node.js
index e940ab2..cdd442f 100644
--- a/dist/beautylog.node.js
+++ b/dist/beautylog.node.js
@@ -1,7 +1,7 @@
///
exports.log = require("./beautylog.node.log");
exports.table = require("./beautylog.node.table");
-exports.code = require("./beautylog.node.code");
+//handle figlet
var figletModule = require("./beautylog.node.figlet");
exports.figlet = figletModule.figlet;
exports.figletSync = figletModule.figletSync;
@@ -54,4 +54,4 @@ exports.warn = function (logText) {
return exports.log(logText, 'warn');
};
-//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImJlYXV0eWxvZy5ub2RlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLDRDQUE0QztBQUU5QixXQUFHLFdBQVcsc0JBQXNCLENBQUMsQ0FBQztBQUN0QyxhQUFLLFdBQVcsd0JBQXdCLENBQUMsQ0FBQztBQUMxQyxZQUFJLFdBQVcsdUJBQXVCLENBQUMsQ0FBQztBQUN0RCxJQUFPLFlBQVksV0FBVyx5QkFBeUIsQ0FBQyxDQUFDO0FBRTlDLGNBQU0sR0FBRyxZQUFZLENBQUMsTUFBTSxDQUFDO0FBQzdCLGtCQUFVLEdBQUcsWUFBWSxDQUFDLFVBQVUsQ0FBQztBQUNoRDs7OztHQUlHO0FBQ1EsV0FBRyxHQUFHLFVBQVMsT0FBTztJQUM3QixNQUFNLENBQUMsV0FBRyxDQUFDLE9BQU8sRUFBRSxLQUFLLENBQUMsQ0FBQztBQUMvQixDQUFDLENBQUM7QUFHRjs7OztHQUlHO0FBQ1EsYUFBSyxHQUFHLFVBQVMsT0FBTztJQUMvQixNQUFNLENBQUMsV0FBRyxDQUFDLE9BQU8sRUFBRSxPQUFPLENBQUMsQ0FBQztBQUNqQyxDQUFDLENBQUM7QUFFRjs7OztHQUlHO0FBQ1EsWUFBSSxHQUFHLFVBQVMsT0FBTztJQUM5QixNQUFNLENBQUMsV0FBRyxDQUFDLE9BQU8s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icgbWVzc2FnZSB0byBjb25zb2xlXG4gKiBAcGFyYW0gbG9nVGV4dCBzdHJpbmcgdG8gbG9nIGFzIGVycm9yXG4gKiBAcmV0dXJucyB7Ym9vbGVhbn1cbiAqL1xuZXhwb3J0IGxldCB3YXJuID0gZnVuY3Rpb24obG9nVGV4dCkge1xuICAgIHJldHVybiBsb2cobG9nVGV4dCwgJ3dhcm4nKTtcbn07Il0sInNvdXJjZVJvb3QiOiIvc291cmNlLyJ9
diff --git a/package.json b/package.json
index 3509e09..473475b 100644
--- a/package.json
+++ b/package.json
@@ -34,15 +34,14 @@
"cli-table2": "^0.2.0",
"colors": "1.1.2",
"figlet": "^1.1.1",
- "hlight": "0.0.8",
- "lodash": "^4.5.1",
+ "lodash": "^4.8.1",
"q": "^1.4.1",
- "smartenv": "1.0.10"
+ "smartenv": "1.2.1"
},
"devDependencies": {
"easyserve": "0.0.5",
"gulp": "^3.9.1",
- "gulp-browser": "1.0.10",
- "npmts": "3.1.2"
+ "gulp-browser": "1.2.2",
+ "npmts": "4.0.2"
}
}
diff --git a/test/test.js b/test/test.js
index 08ac6ef..70eac9b 100644
--- a/test/test.js
+++ b/test/test.js
@@ -70,14 +70,6 @@ describe("beautylog", function () {
beautylog.figletSync("Sync!", { font: "Star Wars", color: "blue" });
});
});
- describe(".code", function () {
- it("should highlight code", function () {
- this.timeout(10000);
- beautylog.code("var test = 3;\nfunction(){\n var hello = \"super\"\n};\nvar test;", {
- language: "javascript"
- });
- });
- });
});
-//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsZ0RBQWdEO0FBQ2hELElBQUksUUFBUSxHQUFHLE9BQU8sQ0FBQyxVQUFVLENBQUMsQ0FBQztBQUNuQyxJQUFJLFNBQVMsR0FBRyxPQUFPLENBQUMsa0JBQWtCLENBQUMsQ0FBQztBQUU1QyxRQUFRLENBQUMsV0F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Swic291cmNlUm9vdCI6Ii9zb3VyY2UvIn0=
diff --git a/test/test.js.map b/test/test.js.map
index 8757ff7..00d35b4 100644
--- a/test/test.js.map
+++ b/test/test.js.map
@@ -1 +1 @@
-{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":[],"mappings":"AAAA,gDAAgD;AAChD,IAAI,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AACnC,IAAI,SAAS,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;AAE5C,QAAQ,CAAC,WAAW,EAAC;IACjB,QAAQ,CAAC,uBAAuB,EAAC;QAC7B,EAAE,CAAC,sBAAsB,EAAC;YACtB,SAAS,CAAC,GAAG,CAAC,uDAAuD,CAAC,CAAC;QAC3E,CAAC,CAAC,CAAC;QACH,EAAE,CAAC,uDAAuD,EAAC;YACvD,SAAS,CAAC,GAAG,CAAC,uDAAuD,CAAC,CAAC;YACvE,SAAS,CAAC,GAAG,CAAC,0DAA0D,EAAC,KAAK,CAAC,CAAC;YAChF,SAAS,CAAC,GAAG,CAAC,4DAA4D,EAAC,OAAO,CAAC,CAAC;YACpF,SAAS,CAAC,GAAG,CAAC,2DAA2D,EAAC,MAAM,CAAC,CAAC;YAClF,SAAS,CAAC,GAAG,CAAC,yDAAyD,EAAC,IAAI,CAAC,CAAC;YAC9E,SAAS,CAAC,GAAG,CAAC,8DAA8D,EAAC,SAAS,CAAC,CAAC;YACxF,SAAS,CAAC,GAAG,CAAC,2DAA2D,EAAC,MAAM,CAAC,CAAC;QACtF,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IACH,QAAQ,CAAC,eAAe,EAAC;QACrB,EAAE,CAAC,iCAAiC,EAAC;YACjC,SAAS,CAAC,GAAG,CAAC,uDAAuD,CAAC,CAAC;QAC3E,CAAC,CAAC,CAAA;IACN,CAAC,CAAC,CAAA;IACF,QAAQ,CAAC,iBAAiB,EAAC;QACvB,EAAE,CAAC,kCAAkC,EAAC;YAClC,SAAS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,EAAE,CAAC,8CAA8C,EAAC,UAAS,IAAI;YAC3D,SAAS,CAAC,MAAM,CAAC,QAAQ,EAAC,EAAC,IAAI,EAAC,WAAW,EAAC,KAAK,EAAC,QAAQ,EAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC5E,CAAC,CAAC,CAAA;IACN,CAAC,CAAC,CAAC;IACH,QAAQ,CAAC,aAAa,EAAC;QACnB,EAAE,CAAC,8CAA8C,EAAC;YAC9C,SAAS,CAAC,UAAU,CAAC,OAAO,EAAC,EAAC,IAAI,EAAC,WAAW,EAAC,KAAK,EAAC,MAAM,EAAC,CAAC,CAAC;QAClE,CAAC,CAAC,CAAA;IACN,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/test/test.ts b/test/test.ts
index 7db12dd..193fd7b 100644
--- a/test/test.ts
+++ b/test/test.ts
@@ -72,17 +72,6 @@ describe("beautylog",function(){
beautylog.figletSync("Sync!",{font:"Star Wars",color:"blue"});
})
});
- describe(".code",function(){
- it("should highlight code",function(){
- this.timeout(10000);
- beautylog.code(
- "var test = 3;\nfunction(){\n var hello = \"super\"\n};\nvar test;",
- {
- language:"javascript"
- }
- );
- })
- })
});
diff --git a/ts/beautylog.node.code.ts b/ts/beautylog.node.code.ts
deleted file mode 100644
index bb5d8a2..0000000
--- a/ts/beautylog.node.code.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-///
-
-import plugins = require("./beautylog.plugins");
-var codeFunction = function(codeString,options?){
- var codeSnippet = {
- source:codeString,
- highlighted:"default"
- };
- if (typeof codeString != "string"){
- console.log("beautylog.code() expects a string as first argument!");
- return;
- };
- if (typeof options != "undefined"){
- codeSnippet.highlighted = plugins.hlight(codeSnippet.source,options.language);
- //console.log(codeSnippet.highlighted)
- }
-};
-export = codeFunction;
\ No newline at end of file
diff --git a/ts/beautylog.node.ts b/ts/beautylog.node.ts
index afe1fff..4e1e2bd 100644
--- a/ts/beautylog.node.ts
+++ b/ts/beautylog.node.ts
@@ -2,9 +2,9 @@
export import log = require("./beautylog.node.log");
export import table = require("./beautylog.node.table");
-export import code = require("./beautylog.node.code");
-import figletModule = require("./beautylog.node.figlet");
+//handle figlet
+import figletModule = require("./beautylog.node.figlet");
export let figlet = figletModule.figlet;
export let figletSync = figletModule.figletSync;
/**
diff --git a/ts/typings/browser/ambient/colors/colors.d.ts b/ts/typings/browser/ambient/colors/colors.d.ts
index 9d1cdc4..6721868 100644
--- a/ts/typings/browser/ambient/colors/colors.d.ts
+++ b/ts/typings/browser/ambient/colors/colors.d.ts
@@ -3,7 +3,7 @@
// Type definitions for Colors.js 0.6.0-1
// Project: https://github.com/Marak/colors.js
// Definitions by: Bart van der Schoor
-// Definitions: https://github.com/borisyankov/DefinitelyTyped
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare module "colors" {
interface Color {
@@ -45,7 +45,7 @@ declare module "colors" {
random: Color;
}
- module e {
+ namespace e {
export function setTheme(theme:any): void;
export var black: Color;
diff --git a/ts/typings/browser/ambient/node/node.d.ts b/ts/typings/browser/ambient/node/node.d.ts
index 40f3a98..ffcb16f 100644
--- a/ts/typings/browser/ambient/node/node.d.ts
+++ b/ts/typings/browser/ambient/node/node.d.ts
@@ -2,8 +2,8 @@
// Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/master/node/node.d.ts
// Type definitions for Node.js v4.x
// Project: http://nodejs.org/
-// Definitions by: Microsoft TypeScript , DefinitelyTyped
-// Definitions: https://github.com/borisyankov/DefinitelyTyped
+// Definitions by: Microsoft TypeScript , DefinitelyTyped
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/************************************************
* *
@@ -16,9 +16,9 @@ interface Error {
}
-// compat for TypeScript 1.5.3
+// compat for TypeScript 1.8
// if you use with --target es3 or --target es5 and use below definitions,
-// use the lib.es6.d.ts that is bundled with TypeScript 1.5.3.
+// use the lib.es6.d.ts that is bundled with TypeScript 1.8.
interface MapConstructor {}
interface WeakMapConstructor {}
interface SetConstructor {}
@@ -82,6 +82,7 @@ declare var SlowBuffer: {
// Buffer class
+type BufferEncoding = "ascii" | "utf8" | "utf16le" | "ucs2" | "binary" | "hex";
interface Buffer extends NodeBuffer {}
/**
@@ -166,7 +167,7 @@ declare var Buffer: {
* GLOBAL INTERFACES *
* *
************************************************/
-declare module NodeJS {
+declare namespace NodeJS {
export interface ErrnoException extends Error {
errno?: number;
code?: string;
@@ -176,12 +177,12 @@ declare module NodeJS {
}
export interface EventEmitter {
- addListener(event: string, listener: Function): EventEmitter;
- on(event: string, listener: Function): EventEmitter;
- once(event: string, listener: Function): EventEmitter;
- removeListener(event: string, listener: Function): EventEmitter;
- removeAllListeners(event?: string): EventEmitter;
- setMaxListeners(n: number): EventEmitter;
+ addListener(event: string, listener: Function): this;
+ on(event: string, listener: Function): this;
+ once(event: string, listener: Function): this;
+ removeListener(event: string, listener: Function): this;
+ removeAllListeners(event?: string): this;
+ setMaxListeners(n: number): this;
getMaxListeners(): number;
listeners(event: string): Function[];
emit(event: string, ...args: any[]): boolean;
@@ -213,6 +214,29 @@ declare module NodeJS {
export interface ReadWriteStream extends ReadableStream, WritableStream {}
+ export interface Events extends EventEmitter { }
+
+ export interface Domain extends Events {
+ run(fn: Function): void;
+ add(emitter: Events): void;
+ remove(emitter: Events): void;
+ bind(cb: (err: Error, data: any) => any): any;
+ intercept(cb: (data: any) => any): any;
+ dispose(): void;
+
+ addListener(event: string, listener: Function): this;
+ on(event: string, listener: Function): this;
+ once(event: string, listener: Function): this;
+ removeListener(event: string, listener: Function): this;
+ removeAllListeners(event?: string): this;
+ }
+
+ export interface MemoryUsage {
+ rss: number;
+ heapTotal: number;
+ heapUsed: number;
+ }
+
export interface Process extends EventEmitter {
stdout: WritableStream;
stderr: WritableStream;
@@ -272,14 +296,17 @@ declare module NodeJS {
title: string;
arch: string;
platform: string;
- memoryUsage(): { rss: number; heapTotal: number; heapUsed: number; };
+ memoryUsage(): MemoryUsage;
nextTick(callback: Function): void;
umask(mask?: number): number;
uptime(): number;
hrtime(time?:number[]): number[];
+ domain: Domain;
// Worker
send?(message: any, sendHandle?: any): void;
+ disconnect(): void;
+ connected: boolean;
}
export interface Global {
@@ -375,7 +402,7 @@ interface NodeBuffer {
readUIntBE(offset: number, byteLength: number, noAssert?: boolean): number;
readIntLE(offset: number, byteLength: number, noAssert?: boolean): number;
readIntBE(offset: number, byteLength: number, noAssert?: boolean): number;
- readUInt8(offset: number, noAsset?: boolean): number;
+ readUInt8(offset: number, noAssert?: boolean): number;
readUInt16LE(offset: number, noAssert?: boolean): number;
readUInt16BE(offset: number, noAssert?: boolean): number;
readUInt32LE(offset: number, noAssert?: boolean): number;
@@ -442,12 +469,12 @@ declare module "events" {
static listenerCount(emitter: EventEmitter, event: string): number; // deprecated
static defaultMaxListeners: number;
- addListener(event: string, listener: Function): EventEmitter;
- on(event: string, listener: Function): EventEmitter;
- once(event: string, listener: Function): EventEmitter;
- removeListener(event: string, listener: Function): EventEmitter;
- removeAllListeners(event?: string): EventEmitter;
- setMaxListeners(n: number): EventEmitter;
+ addListener(event: string, listener: Function): this;
+ on(event: string, listener: Function): this;
+ once(event: string, listener: Function): this;
+ removeListener(event: string, listener: Function): this;
+ removeAllListeners(event?: string): this;
+ setMaxListeners(n: number): this;
getMaxListeners(): number;
listeners(event: string): Function[];
emit(event: string, ...args: any[]): boolean;
@@ -475,14 +502,10 @@ declare module "http" {
agent?: Agent|boolean;
}
- export interface Server extends events.EventEmitter {
- listen(port: number, hostname?: string, backlog?: number, callback?: Function): Server;
- listen(port: number, hostname?: string, callback?: Function): Server;
- listen(path: string, callback?: Function): Server;
- listen(handle: any, listeningListener?: Function): Server;
- close(cb?: any): Server;
- address(): { port: number; family: string; address: string; };
+ export interface Server extends events.EventEmitter, net.Server {
+ setTimeout(msecs: number, callback: Function): void;
maxHeadersCount: number;
+ timeout: number;
}
/**
* @deprecated Use IncomingMessage
@@ -532,6 +555,11 @@ declare module "http" {
setNoDelay(noDelay?: boolean): void;
setSocketKeepAlive(enable?: boolean, initialDelay?: number): void;
+ setHeader(name: string, value: string | string[]): void;
+ getHeader(name: string): string;
+ removeHeader(name: string): void;
+ addTrailers(headers: any): void;
+
// Extended base methods
end(): void;
end(buffer: Buffer, cb?: Function): void;
@@ -569,41 +597,41 @@ declare module "http" {
*/
export interface ClientResponse extends IncomingMessage { }
- export interface AgentOptions {
- /**
- * Keep sockets around in a pool to be used by other requests in the future. Default = false
- */
- keepAlive?: boolean;
- /**
- * When using HTTP KeepAlive, how often to send TCP KeepAlive packets over sockets being kept alive. Default = 1000.
- * Only relevant if keepAlive is set to true.
- */
- keepAliveMsecs?: number;
- /**
- * Maximum number of sockets to allow per host. Default for Node 0.10 is 5, default for Node 0.12 is Infinity
- */
- maxSockets?: number;
- /**
- * Maximum number of sockets to leave open in a free state. Only relevant if keepAlive is set to true. Default = 256.
- */
- maxFreeSockets?: number;
- }
+ export interface AgentOptions {
+ /**
+ * Keep sockets around in a pool to be used by other requests in the future. Default = false
+ */
+ keepAlive?: boolean;
+ /**
+ * When using HTTP KeepAlive, how often to send TCP KeepAlive packets over sockets being kept alive. Default = 1000.
+ * Only relevant if keepAlive is set to true.
+ */
+ keepAliveMsecs?: number;
+ /**
+ * Maximum number of sockets to allow per host. Default for Node 0.10 is 5, default for Node 0.12 is Infinity
+ */
+ maxSockets?: number;
+ /**
+ * Maximum number of sockets to leave open in a free state. Only relevant if keepAlive is set to true. Default = 256.
+ */
+ maxFreeSockets?: number;
+ }
export class Agent {
- maxSockets: number;
- sockets: any;
- requests: any;
+ maxSockets: number;
+ sockets: any;
+ requests: any;
- constructor(opts?: AgentOptions);
+ constructor(opts?: AgentOptions);
- /**
- * Destroy any sockets that are currently in use by the agent.
- * It is usually not necessary to do this. However, if you are using an agent with KeepAlive enabled,
- * then it is best to explicitly shut down the agent when you know that it will no longer be used. Otherwise,
- * sockets may hang open for quite a long time before the server terminates them.
- */
- destroy(): void;
- }
+ /**
+ * Destroy any sockets that are currently in use by the agent.
+ * It is usually not necessary to do this. However, if you are using an agent with KeepAlive enabled,
+ * then it is best to explicitly shut down the agent when you know that it will no longer be used. Otherwise,
+ * sockets may hang open for quite a long time before the server terminates them.
+ */
+ destroy(): void;
+ }
export var METHODS: string[];
@@ -628,6 +656,12 @@ declare module "cluster" {
silent?: boolean;
}
+ export interface Address {
+ address: string;
+ port: number;
+ addressType: string;
+ }
+
export class Worker extends events.EventEmitter {
id: string;
process: child.ChildProcess;
@@ -900,15 +934,34 @@ declare module "readline" {
declare module "vm" {
export interface Context { }
- export interface Script {
- runInThisContext(): void;
- runInNewContext(sandbox?: Context): void;
+ export interface ScriptOptions {
+ filename?: string;
+ lineOffset?: number;
+ columnOffset?: number;
+ displayErrors?: boolean;
+ timeout?: number;
+ cachedData?: Buffer;
+ produceCachedData?: boolean;
}
- export function runInThisContext(code: string, filename?: string): void;
- export function runInNewContext(code: string, sandbox?: Context, filename?: string): void;
- export function runInContext(code: string, context: Context, filename?: string): void;
- export function createContext(initSandbox?: Context): Context;
- export function createScript(code: string, filename?: string): Script;
+ export interface RunningScriptOptions {
+ filename?: string;
+ lineOffset?: number;
+ columnOffset?: number;
+ displayErrors?: boolean;
+ timeout?: number;
+ }
+ export class Script {
+ constructor(code: string, options?: ScriptOptions);
+ runInContext(contextifiedSandbox: Context, options?: RunningScriptOptions): any;
+ runInNewContext(sandbox?: Context, options?: RunningScriptOptions): any;
+ runInThisContext(options?: RunningScriptOptions): any;
+ }
+ export function createContext(sandbox?: Context): Context;
+ export function isContext(sandbox: Context): boolean;
+ export function runInContext(code: string, contextifiedSandbox: Context, options?: RunningScriptOptions): any;
+ export function runInDebugContext(code: string): any;
+ export function runInNewContext(code: string, sandbox?: Context, options?: RunningScriptOptions): any;
+ export function runInThisContext(code: string, options?: RunningScriptOptions): any;
}
declare module "child_process" {
@@ -919,7 +972,7 @@ declare module "child_process" {
stdin: stream.Writable;
stdout: stream.Readable;
stderr: stream.Readable;
- stdio: (stream.Readable|stream.Writable)[];
+ stdio: [stream.Writable, stream.Readable, stream.Readable];
pid: number;
kill(signal?: string): void;
send(message: any, sendHandle?: any): void;
@@ -927,39 +980,66 @@ declare module "child_process" {
unref(): void;
}
- export function spawn(command: string, args?: string[], options?: {
+ export interface SpawnOptions {
cwd?: string;
- stdio?: any;
- custom?: any;
env?: any;
+ stdio?: any;
detached?: boolean;
- }): ChildProcess;
- export function exec(command: string, options: {
+ uid?: number;
+ gid?: number;
+ shell?: boolean | string;
+ }
+ export function spawn(command: string, args?: string[], options?: SpawnOptions): ChildProcess;
+
+ export interface ExecOptions {
cwd?: string;
- stdio?: any;
- customFds?: any;
env?: any;
- encoding?: string;
+ shell?: string;
timeout?: number;
maxBuffer?: number;
killSignal?: string;
- }, callback?: (error: Error, stdout: Buffer, stderr: Buffer) =>void ): ChildProcess;
- export function exec(command: string, callback?: (error: Error, stdout: Buffer, stderr: Buffer) =>void ): ChildProcess;
- export function execFile(file: string,
- callback?: (error: Error, stdout: Buffer, stderr: Buffer) =>void ): ChildProcess;
- export function execFile(file: string, args?: string[],
- callback?: (error: Error, stdout: Buffer, stderr: Buffer) =>void ): ChildProcess;
- export function execFile(file: string, args?: string[], options?: {
+ uid?: number;
+ gid?: number;
+ }
+ export interface ExecOptionsWithStringEncoding extends ExecOptions {
+ encoding: BufferEncoding;
+ }
+ export interface ExecOptionsWithBufferEncoding extends ExecOptions {
+ encoding: string; // specify `null`.
+ }
+ export function exec(command: string, callback?: (error: Error, stdout: string, stderr: string) =>void ): ChildProcess;
+ export function exec(command: string, options: ExecOptionsWithStringEncoding, callback?: (error: Error, stdout: string, stderr: string) =>void ): ChildProcess;
+ // usage. child_process.exec("tsc", {encoding: null as string}, (err, stdout, stderr) => {});
+ export function exec(command: string, options: ExecOptionsWithBufferEncoding, callback?: (error: Error, stdout: Buffer, stderr: Buffer) =>void ): ChildProcess;
+ export function exec(command: string, options: ExecOptions, callback?: (error: Error, stdout: string, stderr: string) =>void ): ChildProcess;
+
+ export interface ExecFileOptions {
cwd?: string;
- stdio?: any;
- customFds?: any;
env?: any;
- encoding?: string;
timeout?: number;
maxBuffer?: number;
killSignal?: string;
- }, callback?: (error: Error, stdout: Buffer, stderr: Buffer) =>void ): ChildProcess;
- export function fork(modulePath: string, args?: string[], options?: {
+ uid?: number;
+ gid?: number;
+ }
+ export interface ExecFileOptionsWithStringEncoding extends ExecFileOptions {
+ encoding: BufferEncoding;
+ }
+ export interface ExecFileOptionsWithBufferEncoding extends ExecFileOptions {
+ encoding: string; // specify `null`.
+ }
+ export function execFile(file: string, callback?: (error: Error, stdout: string, stderr: string) =>void ): ChildProcess;
+ export function execFile(file: string, options?: ExecFileOptionsWithStringEncoding, callback?: (error: Error, stdout: string, stderr: string) =>void ): ChildProcess;
+ // usage. child_process.execFile("file.sh", {encoding: null as string}, (err, stdout, stderr) => {});
+ export function execFile(file: string, options?: ExecFileOptionsWithBufferEncoding, callback?: (error: Error, stdout: Buffer, stderr: Buffer) =>void ): ChildProcess;
+ export function execFile(file: string, options?: ExecFileOptions, callback?: (error: Error, stdout: string, stderr: string) =>void ): ChildProcess;
+ export function execFile(file: string, args?: string[], callback?: (error: Error, stdout: string, stderr: string) =>void ): ChildProcess;
+ export function execFile(file: string, args?: string[], options?: ExecFileOptionsWithStringEncoding, callback?: (error: Error, stdout: string, stderr: string) =>void ): ChildProcess;
+ // usage. child_process.execFile("file.sh", ["foo"], {encoding: null as string}, (err, stdout, stderr) => {});
+ export function execFile(file: string, args?: string[], options?: ExecFileOptionsWithBufferEncoding, callback?: (error: Error, stdout: Buffer, stderr: Buffer) =>void ): ChildProcess;
+ export function execFile(file: string, args?: string[], options?: ExecFileOptions, callback?: (error: Error, stdout: string, stderr: string) =>void ): ChildProcess;
+
+ export interface ForkOptions {
cwd?: string;
env?: any;
execPath?: string;
@@ -967,8 +1047,10 @@ declare module "child_process" {
silent?: boolean;
uid?: number;
gid?: number;
- }): ChildProcess;
- export function spawnSync(command: string, args?: string[], options?: {
+ }
+ export function fork(modulePath: string, args?: string[], options?: ForkOptions): ChildProcess;
+
+ export interface SpawnSyncOptions {
cwd?: string;
input?: string | Buffer;
stdio?: any;
@@ -976,42 +1058,83 @@ declare module "child_process" {
uid?: number;
gid?: number;
timeout?: number;
- maxBuffer?: number;
killSignal?: string;
+ maxBuffer?: number;
encoding?: string;
- }): {
+ shell?: boolean | string;
+ }
+ export interface SpawnSyncOptionsWithStringEncoding extends SpawnSyncOptions {
+ encoding: BufferEncoding;
+ }
+ export interface SpawnSyncOptionsWithBufferEncoding extends SpawnSyncOptions {
+ encoding: string; // specify `null`.
+ }
+ export interface SpawnSyncReturns {
pid: number;
output: string[];
- stdout: string | Buffer;
- stderr: string | Buffer;
+ stdout: T;
+ stderr: T;
status: number;
signal: string;
error: Error;
- };
- export function execSync(command: string, options?: {
+ }
+ export function spawnSync(command: string): SpawnSyncReturns;
+ export function spawnSync(command: string, options?: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns;
+ export function spawnSync(command: string, options?: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns;
+ export function spawnSync(command: string, options?: SpawnSyncOptions): SpawnSyncReturns;
+ export function spawnSync(command: string, args?: string[], options?: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns;
+ export function spawnSync(command: string, args?: string[], options?: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns;
+ export function spawnSync(command: string, args?: string[], options?: SpawnSyncOptions): SpawnSyncReturns;
+
+ export interface ExecSyncOptions {
cwd?: string;
- input?: string|Buffer;
+ input?: string | Buffer;
+ stdio?: any;
+ env?: any;
+ shell?: string;
+ uid?: number;
+ gid?: number;
+ timeout?: number;
+ killSignal?: string;
+ maxBuffer?: number;
+ encoding?: string;
+ }
+ export interface ExecSyncOptionsWithStringEncoding extends ExecSyncOptions {
+ encoding: BufferEncoding;
+ }
+ export interface ExecSyncOptionsWithBufferEncoding extends ExecSyncOptions {
+ encoding: string; // specify `null`.
+ }
+ export function execSync(command: string): Buffer;
+ export function execSync(command: string, options?: ExecSyncOptionsWithStringEncoding): string;
+ export function execSync(command: string, options?: ExecSyncOptionsWithBufferEncoding): Buffer;
+ export function execSync(command: string, options?: ExecSyncOptions): Buffer;
+
+ export interface ExecFileSyncOptions {
+ cwd?: string;
+ input?: string | Buffer;
stdio?: any;
env?: any;
uid?: number;
gid?: number;
timeout?: number;
- maxBuffer?: number;
killSignal?: string;
- encoding?: string;
- }): string | Buffer;
- export function execFileSync(command: string, args?: string[], options?: {
- cwd?: string;
- input?: string|Buffer;
- stdio?: any;
- env?: any;
- uid?: number;
- gid?: number;
- timeout?: number;
maxBuffer?: number;
- killSignal?: string;
encoding?: string;
- }): string | Buffer;
+ }
+ export interface ExecFileSyncOptionsWithStringEncoding extends ExecFileSyncOptions {
+ encoding: BufferEncoding;
+ }
+ export interface ExecFileSyncOptionsWithBufferEncoding extends ExecFileSyncOptions {
+ encoding: string; // specify `null`.
+ }
+ export function execFileSync(command: string): Buffer;
+ export function execFileSync(command: string, options?: ExecFileSyncOptionsWithStringEncoding): string;
+ export function execFileSync(command: string, options?: ExecFileSyncOptionsWithBufferEncoding): Buffer;
+ export function execFileSync(command: string, options?: ExecFileSyncOptions): Buffer;
+ export function execFileSync(command: string, args?: string[], options?: ExecFileSyncOptionsWithStringEncoding): string;
+ export function execFileSync(command: string, args?: string[], options?: ExecFileSyncOptionsWithBufferEncoding): Buffer;
+ export function execFileSync(command: string, args?: string[], options?: ExecFileSyncOptions): Buffer;
}
declare module "url" {
@@ -1096,12 +1219,29 @@ declare module "net" {
new (options?: { fd?: string; type?: string; allowHalfOpen?: boolean; }): Socket;
};
+ export interface ListenOptions {
+ port?: number;
+ host?: string;
+ backlog?: number;
+ path?: string;
+ exclusive?: boolean;
+ }
+
export interface Server extends Socket {
- listen(port: number, host?: string, backlog?: number, listeningListener?: Function): Server;
+ listen(port: number, hostname?: string, backlog?: number, listeningListener?: Function): Server;
+ listen(port: number, hostname?: string, listeningListener?: Function): Server;
+ listen(port: number, backlog?: number, listeningListener?: Function): Server;
+ listen(port: number, listeningListener?: Function): Server;
+ listen(path: string, backlog?: number, listeningListener?: Function): Server;
listen(path: string, listeningListener?: Function): Server;
+ listen(handle: any, backlog?: number, listeningListener?: Function): Server;
listen(handle: any, listeningListener?: Function): Server;
+ listen(options: ListenOptions, listeningListener?: Function): Server;
close(callback?: Function): Server;
address(): { port: number; family: string; address: string; };
+ getConnections(cb: (error: Error, count: number) => void): void;
+ ref(): Server;
+ unref(): Server;
maxConnections: number;
connections: number;
}
@@ -1329,7 +1469,8 @@ declare module "fs" {
export function write(fd: number, data: any, callback?: (err: NodeJS.ErrnoException, written: number, str: string) => void): void;
export function write(fd: number, data: any, offset: number, callback?: (err: NodeJS.ErrnoException, written: number, str: string) => void): void;
export function write(fd: number, data: any, offset: number, encoding: string, callback?: (err: NodeJS.ErrnoException, written: number, str: string) => void): void;
- export function writeSync(fd: number, buffer: Buffer, offset: number, length: number, position: number): number;
+ export function writeSync(fd: number, buffer: Buffer, offset: number, length: number, position?: number): number;
+ export function writeSync(fd: number, data: any, position?: number, enconding?: string): number;
export function read(fd: number, buffer: Buffer, offset: number, length: number, position: number, callback?: (err: NodeJS.ErrnoException, bytesRead: number, buffer: Buffer) => void): void;
export function readSync(fd: number, buffer: Buffer, offset: number, length: number, position: number): number;
/*
@@ -1625,12 +1766,6 @@ declare module "tls" {
}
export interface Server extends net.Server {
- // Extended base methods
- listen(port: number, host?: string, backlog?: number, listeningListener?: Function): Server;
- listen(path: string, listeningListener?: Function): Server;
- listen(handle: any, listeningListener?: Function): Server;
-
- listen(port: number, host?: string, callback?: Function): Server;
close(): Server;
address(): { port: number; family: string; address: string; };
addContext(hostName: string, credentials: {
@@ -1716,21 +1851,27 @@ declare module "crypto" {
}
export function createCipher(algorithm: string, password: any): Cipher;
export function createCipheriv(algorithm: string, key: any, iv: any): Cipher;
- export interface Cipher {
+ export interface Cipher extends NodeJS.ReadWriteStream {
update(data: Buffer): Buffer;
- update(data: string, input_encoding?: string, output_encoding?: string): string;
+ update(data: string, input_encoding: "utf8"|"ascii"|"binary"): Buffer;
+ update(data: Buffer, input_encoding: any, output_encoding: "binary"|"base64"|"hex"): string;
+ update(data: string, input_encoding: "utf8"|"ascii"|"binary", output_encoding: "binary"|"base64"|"hex"): string;
final(): Buffer;
final(output_encoding: string): string;
setAutoPadding(auto_padding: boolean): void;
+ getAuthTag(): Buffer;
}
export function createDecipher(algorithm: string, password: any): Decipher;
export function createDecipheriv(algorithm: string, key: any, iv: any): Decipher;
- export interface Decipher {
+ export interface Decipher extends NodeJS.ReadWriteStream {
update(data: Buffer): Buffer;
- update(data: string, input_encoding?: string, output_encoding?: string): string;
+ update(data: string, input_encoding: "binary"|"base64"|"hex"): Buffer;
+ update(data: Buffer, input_encoding: any, output_encoding: "utf8"|"ascii"|"binary"): string;
+ update(data: string, input_encoding: "binary"|"base64"|"hex", output_encoding: "utf8"|"ascii"|"binary"): string;
final(): Buffer;
final(output_encoding: string): string;
setAutoPadding(auto_padding: boolean): void;
+ setAuthTag(tag: Buffer): void;
}
export function createSign(algorithm: string): Signer;
export interface Signer extends NodeJS.WritableStream {
@@ -1891,7 +2032,7 @@ declare module "util" {
declare module "assert" {
function internal (value: any, message?: string): void;
- module internal {
+ namespace internal {
export class AssertionError implements Error {
name: string;
message: string;
@@ -1953,19 +2094,13 @@ declare module "tty" {
declare module "domain" {
import * as events from "events";
- export class Domain extends events.EventEmitter {
+ export class Domain extends events.EventEmitter implements NodeJS.Domain {
run(fn: Function): void;
add(emitter: events.EventEmitter): void;
remove(emitter: events.EventEmitter): void;
bind(cb: (err: Error, data: any) => any): any;
intercept(cb: (data: any) => any): any;
dispose(): void;
-
- addListener(event: string, listener: Function): Domain;
- on(event: string, listener: Function): Domain;
- once(event: string, listener: Function): Domain;
- removeListener(event: string, listener: Function): Domain;
- removeAllListeners(event?: string): Domain;
}
export function create(): Domain;
diff --git a/ts/typings/main/ambient/colors/colors.d.ts b/ts/typings/main/ambient/colors/colors.d.ts
index 9d1cdc4..6721868 100644
--- a/ts/typings/main/ambient/colors/colors.d.ts
+++ b/ts/typings/main/ambient/colors/colors.d.ts
@@ -3,7 +3,7 @@
// Type definitions for Colors.js 0.6.0-1
// Project: https://github.com/Marak/colors.js
// Definitions by: Bart van der Schoor
-// Definitions: https://github.com/borisyankov/DefinitelyTyped
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare module "colors" {
interface Color {
@@ -45,7 +45,7 @@ declare module "colors" {
random: Color;
}
- module e {
+ namespace e {
export function setTheme(theme:any): void;
export var black: Color;
diff --git a/ts/typings/main/ambient/node/node.d.ts b/ts/typings/main/ambient/node/node.d.ts
index 40f3a98..ffcb16f 100644
--- a/ts/typings/main/ambient/node/node.d.ts
+++ b/ts/typings/main/ambient/node/node.d.ts
@@ -2,8 +2,8 @@
// Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/master/node/node.d.ts
// Type definitions for Node.js v4.x
// Project: http://nodejs.org/
-// Definitions by: Microsoft TypeScript , DefinitelyTyped
-// Definitions: https://github.com/borisyankov/DefinitelyTyped
+// Definitions by: Microsoft TypeScript , DefinitelyTyped
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/************************************************
* *
@@ -16,9 +16,9 @@ interface Error {
}
-// compat for TypeScript 1.5.3
+// compat for TypeScript 1.8
// if you use with --target es3 or --target es5 and use below definitions,
-// use the lib.es6.d.ts that is bundled with TypeScript 1.5.3.
+// use the lib.es6.d.ts that is bundled with TypeScript 1.8.
interface MapConstructor {}
interface WeakMapConstructor {}
interface SetConstructor {}
@@ -82,6 +82,7 @@ declare var SlowBuffer: {
// Buffer class
+type BufferEncoding = "ascii" | "utf8" | "utf16le" | "ucs2" | "binary" | "hex";
interface Buffer extends NodeBuffer {}
/**
@@ -166,7 +167,7 @@ declare var Buffer: {
* GLOBAL INTERFACES *
* *
************************************************/
-declare module NodeJS {
+declare namespace NodeJS {
export interface ErrnoException extends Error {
errno?: number;
code?: string;
@@ -176,12 +177,12 @@ declare module NodeJS {
}
export interface EventEmitter {
- addListener(event: string, listener: Function): EventEmitter;
- on(event: string, listener: Function): EventEmitter;
- once(event: string, listener: Function): EventEmitter;
- removeListener(event: string, listener: Function): EventEmitter;
- removeAllListeners(event?: string): EventEmitter;
- setMaxListeners(n: number): EventEmitter;
+ addListener(event: string, listener: Function): this;
+ on(event: string, listener: Function): this;
+ once(event: string, listener: Function): this;
+ removeListener(event: string, listener: Function): this;
+ removeAllListeners(event?: string): this;
+ setMaxListeners(n: number): this;
getMaxListeners(): number;
listeners(event: string): Function[];
emit(event: string, ...args: any[]): boolean;
@@ -213,6 +214,29 @@ declare module NodeJS {
export interface ReadWriteStream extends ReadableStream, WritableStream {}
+ export interface Events extends EventEmitter { }
+
+ export interface Domain extends Events {
+ run(fn: Function): void;
+ add(emitter: Events): void;
+ remove(emitter: Events): void;
+ bind(cb: (err: Error, data: any) => any): any;
+ intercept(cb: (data: any) => any): any;
+ dispose(): void;
+
+ addListener(event: string, listener: Function): this;
+ on(event: string, listener: Function): this;
+ once(event: string, listener: Function): this;
+ removeListener(event: string, listener: Function): this;
+ removeAllListeners(event?: string): this;
+ }
+
+ export interface MemoryUsage {
+ rss: number;
+ heapTotal: number;
+ heapUsed: number;
+ }
+
export interface Process extends EventEmitter {
stdout: WritableStream;
stderr: WritableStream;
@@ -272,14 +296,17 @@ declare module NodeJS {
title: string;
arch: string;
platform: string;
- memoryUsage(): { rss: number; heapTotal: number; heapUsed: number; };
+ memoryUsage(): MemoryUsage;
nextTick(callback: Function): void;
umask(mask?: number): number;
uptime(): number;
hrtime(time?:number[]): number[];
+ domain: Domain;
// Worker
send?(message: any, sendHandle?: any): void;
+ disconnect(): void;
+ connected: boolean;
}
export interface Global {
@@ -375,7 +402,7 @@ interface NodeBuffer {
readUIntBE(offset: number, byteLength: number, noAssert?: boolean): number;
readIntLE(offset: number, byteLength: number, noAssert?: boolean): number;
readIntBE(offset: number, byteLength: number, noAssert?: boolean): number;
- readUInt8(offset: number, noAsset?: boolean): number;
+ readUInt8(offset: number, noAssert?: boolean): number;
readUInt16LE(offset: number, noAssert?: boolean): number;
readUInt16BE(offset: number, noAssert?: boolean): number;
readUInt32LE(offset: number, noAssert?: boolean): number;
@@ -442,12 +469,12 @@ declare module "events" {
static listenerCount(emitter: EventEmitter, event: string): number; // deprecated
static defaultMaxListeners: number;
- addListener(event: string, listener: Function): EventEmitter;
- on(event: string, listener: Function): EventEmitter;
- once(event: string, listener: Function): EventEmitter;
- removeListener(event: string, listener: Function): EventEmitter;
- removeAllListeners(event?: string): EventEmitter;
- setMaxListeners(n: number): EventEmitter;
+ addListener(event: string, listener: Function): this;
+ on(event: string, listener: Function): this;
+ once(event: string, listener: Function): this;
+ removeListener(event: string, listener: Function): this;
+ removeAllListeners(event?: string): this;
+ setMaxListeners(n: number): this;
getMaxListeners(): number;
listeners(event: string): Function[];
emit(event: string, ...args: any[]): boolean;
@@ -475,14 +502,10 @@ declare module "http" {
agent?: Agent|boolean;
}
- export interface Server extends events.EventEmitter {
- listen(port: number, hostname?: string, backlog?: number, callback?: Function): Server;
- listen(port: number, hostname?: string, callback?: Function): Server;
- listen(path: string, callback?: Function): Server;
- listen(handle: any, listeningListener?: Function): Server;
- close(cb?: any): Server;
- address(): { port: number; family: string; address: string; };
+ export interface Server extends events.EventEmitter, net.Server {
+ setTimeout(msecs: number, callback: Function): void;
maxHeadersCount: number;
+ timeout: number;
}
/**
* @deprecated Use IncomingMessage
@@ -532,6 +555,11 @@ declare module "http" {
setNoDelay(noDelay?: boolean): void;
setSocketKeepAlive(enable?: boolean, initialDelay?: number): void;
+ setHeader(name: string, value: string | string[]): void;
+ getHeader(name: string): string;
+ removeHeader(name: string): void;
+ addTrailers(headers: any): void;
+
// Extended base methods
end(): void;
end(buffer: Buffer, cb?: Function): void;
@@ -569,41 +597,41 @@ declare module "http" {
*/
export interface ClientResponse extends IncomingMessage { }
- export interface AgentOptions {
- /**
- * Keep sockets around in a pool to be used by other requests in the future. Default = false
- */
- keepAlive?: boolean;
- /**
- * When using HTTP KeepAlive, how often to send TCP KeepAlive packets over sockets being kept alive. Default = 1000.
- * Only relevant if keepAlive is set to true.
- */
- keepAliveMsecs?: number;
- /**
- * Maximum number of sockets to allow per host. Default for Node 0.10 is 5, default for Node 0.12 is Infinity
- */
- maxSockets?: number;
- /**
- * Maximum number of sockets to leave open in a free state. Only relevant if keepAlive is set to true. Default = 256.
- */
- maxFreeSockets?: number;
- }
+ export interface AgentOptions {
+ /**
+ * Keep sockets around in a pool to be used by other requests in the future. Default = false
+ */
+ keepAlive?: boolean;
+ /**
+ * When using HTTP KeepAlive, how often to send TCP KeepAlive packets over sockets being kept alive. Default = 1000.
+ * Only relevant if keepAlive is set to true.
+ */
+ keepAliveMsecs?: number;
+ /**
+ * Maximum number of sockets to allow per host. Default for Node 0.10 is 5, default for Node 0.12 is Infinity
+ */
+ maxSockets?: number;
+ /**
+ * Maximum number of sockets to leave open in a free state. Only relevant if keepAlive is set to true. Default = 256.
+ */
+ maxFreeSockets?: number;
+ }
export class Agent {
- maxSockets: number;
- sockets: any;
- requests: any;
+ maxSockets: number;
+ sockets: any;
+ requests: any;
- constructor(opts?: AgentOptions);
+ constructor(opts?: AgentOptions);
- /**
- * Destroy any sockets that are currently in use by the agent.
- * It is usually not necessary to do this. However, if you are using an agent with KeepAlive enabled,
- * then it is best to explicitly shut down the agent when you know that it will no longer be used. Otherwise,
- * sockets may hang open for quite a long time before the server terminates them.
- */
- destroy(): void;
- }
+ /**
+ * Destroy any sockets that are currently in use by the agent.
+ * It is usually not necessary to do this. However, if you are using an agent with KeepAlive enabled,
+ * then it is best to explicitly shut down the agent when you know that it will no longer be used. Otherwise,
+ * sockets may hang open for quite a long time before the server terminates them.
+ */
+ destroy(): void;
+ }
export var METHODS: string[];
@@ -628,6 +656,12 @@ declare module "cluster" {
silent?: boolean;
}
+ export interface Address {
+ address: string;
+ port: number;
+ addressType: string;
+ }
+
export class Worker extends events.EventEmitter {
id: string;
process: child.ChildProcess;
@@ -900,15 +934,34 @@ declare module "readline" {
declare module "vm" {
export interface Context { }
- export interface Script {
- runInThisContext(): void;
- runInNewContext(sandbox?: Context): void;
+ export interface ScriptOptions {
+ filename?: string;
+ lineOffset?: number;
+ columnOffset?: number;
+ displayErrors?: boolean;
+ timeout?: number;
+ cachedData?: Buffer;
+ produceCachedData?: boolean;
}
- export function runInThisContext(code: string, filename?: string): void;
- export function runInNewContext(code: string, sandbox?: Context, filename?: string): void;
- export function runInContext(code: string, context: Context, filename?: string): void;
- export function createContext(initSandbox?: Context): Context;
- export function createScript(code: string, filename?: string): Script;
+ export interface RunningScriptOptions {
+ filename?: string;
+ lineOffset?: number;
+ columnOffset?: number;
+ displayErrors?: boolean;
+ timeout?: number;
+ }
+ export class Script {
+ constructor(code: string, options?: ScriptOptions);
+ runInContext(contextifiedSandbox: Context, options?: RunningScriptOptions): any;
+ runInNewContext(sandbox?: Context, options?: RunningScriptOptions): any;
+ runInThisContext(options?: RunningScriptOptions): any;
+ }
+ export function createContext(sandbox?: Context): Context;
+ export function isContext(sandbox: Context): boolean;
+ export function runInContext(code: string, contextifiedSandbox: Context, options?: RunningScriptOptions): any;
+ export function runInDebugContext(code: string): any;
+ export function runInNewContext(code: string, sandbox?: Context, options?: RunningScriptOptions): any;
+ export function runInThisContext(code: string, options?: RunningScriptOptions): any;
}
declare module "child_process" {
@@ -919,7 +972,7 @@ declare module "child_process" {
stdin: stream.Writable;
stdout: stream.Readable;
stderr: stream.Readable;
- stdio: (stream.Readable|stream.Writable)[];
+ stdio: [stream.Writable, stream.Readable, stream.Readable];
pid: number;
kill(signal?: string): void;
send(message: any, sendHandle?: any): void;
@@ -927,39 +980,66 @@ declare module "child_process" {
unref(): void;
}
- export function spawn(command: string, args?: string[], options?: {
+ export interface SpawnOptions {
cwd?: string;
- stdio?: any;
- custom?: any;
env?: any;
+ stdio?: any;
detached?: boolean;
- }): ChildProcess;
- export function exec(command: string, options: {
+ uid?: number;
+ gid?: number;
+ shell?: boolean | string;
+ }
+ export function spawn(command: string, args?: string[], options?: SpawnOptions): ChildProcess;
+
+ export interface ExecOptions {
cwd?: string;
- stdio?: any;
- customFds?: any;
env?: any;
- encoding?: string;
+ shell?: string;
timeout?: number;
maxBuffer?: number;
killSignal?: string;
- }, callback?: (error: Error, stdout: Buffer, stderr: Buffer) =>void ): ChildProcess;
- export function exec(command: string, callback?: (error: Error, stdout: Buffer, stderr: Buffer) =>void ): ChildProcess;
- export function execFile(file: string,
- callback?: (error: Error, stdout: Buffer, stderr: Buffer) =>void ): ChildProcess;
- export function execFile(file: string, args?: string[],
- callback?: (error: Error, stdout: Buffer, stderr: Buffer) =>void ): ChildProcess;
- export function execFile(file: string, args?: string[], options?: {
+ uid?: number;
+ gid?: number;
+ }
+ export interface ExecOptionsWithStringEncoding extends ExecOptions {
+ encoding: BufferEncoding;
+ }
+ export interface ExecOptionsWithBufferEncoding extends ExecOptions {
+ encoding: string; // specify `null`.
+ }
+ export function exec(command: string, callback?: (error: Error, stdout: string, stderr: string) =>void ): ChildProcess;
+ export function exec(command: string, options: ExecOptionsWithStringEncoding, callback?: (error: Error, stdout: string, stderr: string) =>void ): ChildProcess;
+ // usage. child_process.exec("tsc", {encoding: null as string}, (err, stdout, stderr) => {});
+ export function exec(command: string, options: ExecOptionsWithBufferEncoding, callback?: (error: Error, stdout: Buffer, stderr: Buffer) =>void ): ChildProcess;
+ export function exec(command: string, options: ExecOptions, callback?: (error: Error, stdout: string, stderr: string) =>void ): ChildProcess;
+
+ export interface ExecFileOptions {
cwd?: string;
- stdio?: any;
- customFds?: any;
env?: any;
- encoding?: string;
timeout?: number;
maxBuffer?: number;
killSignal?: string;
- }, callback?: (error: Error, stdout: Buffer, stderr: Buffer) =>void ): ChildProcess;
- export function fork(modulePath: string, args?: string[], options?: {
+ uid?: number;
+ gid?: number;
+ }
+ export interface ExecFileOptionsWithStringEncoding extends ExecFileOptions {
+ encoding: BufferEncoding;
+ }
+ export interface ExecFileOptionsWithBufferEncoding extends ExecFileOptions {
+ encoding: string; // specify `null`.
+ }
+ export function execFile(file: string, callback?: (error: Error, stdout: string, stderr: string) =>void ): ChildProcess;
+ export function execFile(file: string, options?: ExecFileOptionsWithStringEncoding, callback?: (error: Error, stdout: string, stderr: string) =>void ): ChildProcess;
+ // usage. child_process.execFile("file.sh", {encoding: null as string}, (err, stdout, stderr) => {});
+ export function execFile(file: string, options?: ExecFileOptionsWithBufferEncoding, callback?: (error: Error, stdout: Buffer, stderr: Buffer) =>void ): ChildProcess;
+ export function execFile(file: string, options?: ExecFileOptions, callback?: (error: Error, stdout: string, stderr: string) =>void ): ChildProcess;
+ export function execFile(file: string, args?: string[], callback?: (error: Error, stdout: string, stderr: string) =>void ): ChildProcess;
+ export function execFile(file: string, args?: string[], options?: ExecFileOptionsWithStringEncoding, callback?: (error: Error, stdout: string, stderr: string) =>void ): ChildProcess;
+ // usage. child_process.execFile("file.sh", ["foo"], {encoding: null as string}, (err, stdout, stderr) => {});
+ export function execFile(file: string, args?: string[], options?: ExecFileOptionsWithBufferEncoding, callback?: (error: Error, stdout: Buffer, stderr: Buffer) =>void ): ChildProcess;
+ export function execFile(file: string, args?: string[], options?: ExecFileOptions, callback?: (error: Error, stdout: string, stderr: string) =>void ): ChildProcess;
+
+ export interface ForkOptions {
cwd?: string;
env?: any;
execPath?: string;
@@ -967,8 +1047,10 @@ declare module "child_process" {
silent?: boolean;
uid?: number;
gid?: number;
- }): ChildProcess;
- export function spawnSync(command: string, args?: string[], options?: {
+ }
+ export function fork(modulePath: string, args?: string[], options?: ForkOptions): ChildProcess;
+
+ export interface SpawnSyncOptions {
cwd?: string;
input?: string | Buffer;
stdio?: any;
@@ -976,42 +1058,83 @@ declare module "child_process" {
uid?: number;
gid?: number;
timeout?: number;
- maxBuffer?: number;
killSignal?: string;
+ maxBuffer?: number;
encoding?: string;
- }): {
+ shell?: boolean | string;
+ }
+ export interface SpawnSyncOptionsWithStringEncoding extends SpawnSyncOptions {
+ encoding: BufferEncoding;
+ }
+ export interface SpawnSyncOptionsWithBufferEncoding extends SpawnSyncOptions {
+ encoding: string; // specify `null`.
+ }
+ export interface SpawnSyncReturns {
pid: number;
output: string[];
- stdout: string | Buffer;
- stderr: string | Buffer;
+ stdout: T;
+ stderr: T;
status: number;
signal: string;
error: Error;
- };
- export function execSync(command: string, options?: {
+ }
+ export function spawnSync(command: string): SpawnSyncReturns;
+ export function spawnSync(command: string, options?: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns;
+ export function spawnSync(command: string, options?: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns;
+ export function spawnSync(command: string, options?: SpawnSyncOptions): SpawnSyncReturns;
+ export function spawnSync(command: string, args?: string[], options?: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns;
+ export function spawnSync(command: string, args?: string[], options?: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns;
+ export function spawnSync(command: string, args?: string[], options?: SpawnSyncOptions): SpawnSyncReturns;
+
+ export interface ExecSyncOptions {
cwd?: string;
- input?: string|Buffer;
+ input?: string | Buffer;
+ stdio?: any;
+ env?: any;
+ shell?: string;
+ uid?: number;
+ gid?: number;
+ timeout?: number;
+ killSignal?: string;
+ maxBuffer?: number;
+ encoding?: string;
+ }
+ export interface ExecSyncOptionsWithStringEncoding extends ExecSyncOptions {
+ encoding: BufferEncoding;
+ }
+ export interface ExecSyncOptionsWithBufferEncoding extends ExecSyncOptions {
+ encoding: string; // specify `null`.
+ }
+ export function execSync(command: string): Buffer;
+ export function execSync(command: string, options?: ExecSyncOptionsWithStringEncoding): string;
+ export function execSync(command: string, options?: ExecSyncOptionsWithBufferEncoding): Buffer;
+ export function execSync(command: string, options?: ExecSyncOptions): Buffer;
+
+ export interface ExecFileSyncOptions {
+ cwd?: string;
+ input?: string | Buffer;
stdio?: any;
env?: any;
uid?: number;
gid?: number;
timeout?: number;
- maxBuffer?: number;
killSignal?: string;
- encoding?: string;
- }): string | Buffer;
- export function execFileSync(command: string, args?: string[], options?: {
- cwd?: string;
- input?: string|Buffer;
- stdio?: any;
- env?: any;
- uid?: number;
- gid?: number;
- timeout?: number;
maxBuffer?: number;
- killSignal?: string;
encoding?: string;
- }): string | Buffer;
+ }
+ export interface ExecFileSyncOptionsWithStringEncoding extends ExecFileSyncOptions {
+ encoding: BufferEncoding;
+ }
+ export interface ExecFileSyncOptionsWithBufferEncoding extends ExecFileSyncOptions {
+ encoding: string; // specify `null`.
+ }
+ export function execFileSync(command: string): Buffer;
+ export function execFileSync(command: string, options?: ExecFileSyncOptionsWithStringEncoding): string;
+ export function execFileSync(command: string, options?: ExecFileSyncOptionsWithBufferEncoding): Buffer;
+ export function execFileSync(command: string, options?: ExecFileSyncOptions): Buffer;
+ export function execFileSync(command: string, args?: string[], options?: ExecFileSyncOptionsWithStringEncoding): string;
+ export function execFileSync(command: string, args?: string[], options?: ExecFileSyncOptionsWithBufferEncoding): Buffer;
+ export function execFileSync(command: string, args?: string[], options?: ExecFileSyncOptions): Buffer;
}
declare module "url" {
@@ -1096,12 +1219,29 @@ declare module "net" {
new (options?: { fd?: string; type?: string; allowHalfOpen?: boolean; }): Socket;
};
+ export interface ListenOptions {
+ port?: number;
+ host?: string;
+ backlog?: number;
+ path?: string;
+ exclusive?: boolean;
+ }
+
export interface Server extends Socket {
- listen(port: number, host?: string, backlog?: number, listeningListener?: Function): Server;
+ listen(port: number, hostname?: string, backlog?: number, listeningListener?: Function): Server;
+ listen(port: number, hostname?: string, listeningListener?: Function): Server;
+ listen(port: number, backlog?: number, listeningListener?: Function): Server;
+ listen(port: number, listeningListener?: Function): Server;
+ listen(path: string, backlog?: number, listeningListener?: Function): Server;
listen(path: string, listeningListener?: Function): Server;
+ listen(handle: any, backlog?: number, listeningListener?: Function): Server;
listen(handle: any, listeningListener?: Function): Server;
+ listen(options: ListenOptions, listeningListener?: Function): Server;
close(callback?: Function): Server;
address(): { port: number; family: string; address: string; };
+ getConnections(cb: (error: Error, count: number) => void): void;
+ ref(): Server;
+ unref(): Server;
maxConnections: number;
connections: number;
}
@@ -1329,7 +1469,8 @@ declare module "fs" {
export function write(fd: number, data: any, callback?: (err: NodeJS.ErrnoException, written: number, str: string) => void): void;
export function write(fd: number, data: any, offset: number, callback?: (err: NodeJS.ErrnoException, written: number, str: string) => void): void;
export function write(fd: number, data: any, offset: number, encoding: string, callback?: (err: NodeJS.ErrnoException, written: number, str: string) => void): void;
- export function writeSync(fd: number, buffer: Buffer, offset: number, length: number, position: number): number;
+ export function writeSync(fd: number, buffer: Buffer, offset: number, length: number, position?: number): number;
+ export function writeSync(fd: number, data: any, position?: number, enconding?: string): number;
export function read(fd: number, buffer: Buffer, offset: number, length: number, position: number, callback?: (err: NodeJS.ErrnoException, bytesRead: number, buffer: Buffer) => void): void;
export function readSync(fd: number, buffer: Buffer, offset: number, length: number, position: number): number;
/*
@@ -1625,12 +1766,6 @@ declare module "tls" {
}
export interface Server extends net.Server {
- // Extended base methods
- listen(port: number, host?: string, backlog?: number, listeningListener?: Function): Server;
- listen(path: string, listeningListener?: Function): Server;
- listen(handle: any, listeningListener?: Function): Server;
-
- listen(port: number, host?: string, callback?: Function): Server;
close(): Server;
address(): { port: number; family: string; address: string; };
addContext(hostName: string, credentials: {
@@ -1716,21 +1851,27 @@ declare module "crypto" {
}
export function createCipher(algorithm: string, password: any): Cipher;
export function createCipheriv(algorithm: string, key: any, iv: any): Cipher;
- export interface Cipher {
+ export interface Cipher extends NodeJS.ReadWriteStream {
update(data: Buffer): Buffer;
- update(data: string, input_encoding?: string, output_encoding?: string): string;
+ update(data: string, input_encoding: "utf8"|"ascii"|"binary"): Buffer;
+ update(data: Buffer, input_encoding: any, output_encoding: "binary"|"base64"|"hex"): string;
+ update(data: string, input_encoding: "utf8"|"ascii"|"binary", output_encoding: "binary"|"base64"|"hex"): string;
final(): Buffer;
final(output_encoding: string): string;
setAutoPadding(auto_padding: boolean): void;
+ getAuthTag(): Buffer;
}
export function createDecipher(algorithm: string, password: any): Decipher;
export function createDecipheriv(algorithm: string, key: any, iv: any): Decipher;
- export interface Decipher {
+ export interface Decipher extends NodeJS.ReadWriteStream {
update(data: Buffer): Buffer;
- update(data: string, input_encoding?: string, output_encoding?: string): string;
+ update(data: string, input_encoding: "binary"|"base64"|"hex"): Buffer;
+ update(data: Buffer, input_encoding: any, output_encoding: "utf8"|"ascii"|"binary"): string;
+ update(data: string, input_encoding: "binary"|"base64"|"hex", output_encoding: "utf8"|"ascii"|"binary"): string;
final(): Buffer;
final(output_encoding: string): string;
setAutoPadding(auto_padding: boolean): void;
+ setAuthTag(tag: Buffer): void;
}
export function createSign(algorithm: string): Signer;
export interface Signer extends NodeJS.WritableStream {
@@ -1891,7 +2032,7 @@ declare module "util" {
declare module "assert" {
function internal (value: any, message?: string): void;
- module internal {
+ namespace internal {
export class AssertionError implements Error {
name: string;
message: string;
@@ -1953,19 +2094,13 @@ declare module "tty" {
declare module "domain" {
import * as events from "events";
- export class Domain extends events.EventEmitter {
+ export class Domain extends events.EventEmitter implements NodeJS.Domain {
run(fn: Function): void;
add(emitter: events.EventEmitter): void;
remove(emitter: events.EventEmitter): void;
bind(cb: (err: Error, data: any) => any): any;
intercept(cb: (data: any) => any): any;
dispose(): void;
-
- addListener(event: string, listener: Function): Domain;
- on(event: string, listener: Function): Domain;
- once(event: string, listener: Function): Domain;
- removeListener(event: string, listener: Function): Domain;
- removeAllListeners(event?: string): Domain;
}
export function create(): Domain;