mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
node.d.ts support object type for Url.query
This commit is contained in:
@@ -59,6 +59,10 @@ class Networker extends events.EventEmitter {
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
/// Url tests : http://nodejs.org/api/url.html
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
url.format(url.parse('http://www.example.com/xyz'));
|
||||
|
||||
// https://google.com/search?q=you're%20a%20lizard%2C%20gary
|
||||
@@ -69,6 +73,10 @@ url.format({
|
||||
query: { q: "you're a lizard, gary" }
|
||||
});
|
||||
|
||||
var helloUrl = url.parse('http://example.com/?hello=world', true)
|
||||
assert.equal(helloUrl.query.hello, 'world');
|
||||
|
||||
|
||||
// Old and new util.inspect APIs
|
||||
util.inspect(["This is nice"], false, 5);
|
||||
util.inspect(["This is nice"], { colors: true, depth: 5, customInspect: false });
|
||||
|
||||
Reference in New Issue
Block a user