mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Update util.inspect API.
Latest API has an options object as the second parameter instead of separate parameters. The old API is still supported so have added the new signature as an overload. Updated node-tests.ts
This commit is contained in:
+4
-1
@@ -5,6 +5,7 @@ import fs = require("fs");
|
||||
import events = require("events");
|
||||
import zlib = require("zlib");
|
||||
import url = require('url');
|
||||
import util = require("util");
|
||||
|
||||
assert(1 + 1 - 2 === 0, "The universe isn't how it should.");
|
||||
|
||||
@@ -50,7 +51,9 @@ url.format({
|
||||
query: { q: "you're a lizard, gary" }
|
||||
});
|
||||
|
||||
|
||||
// Old and new util.inspect APIs
|
||||
util.inspect(["This is nice"], false, 5);
|
||||
util.inspect(["This is nice"], { colors: true, depth: 5, customInspect: false });
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
/// Stream tests : http://nodejs.org/api/stream.html
|
||||
|
||||
Reference in New Issue
Block a user