mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-24 05:06:02 +08:00
Node: use bracket notation for index signature lookup for TS 2.1
Support for index signature properties via dot notation was only added in TS 2.2 https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#dotted-property-for-types-with-string-index-signatures
This commit is contained in:
@@ -558,7 +558,7 @@ namespace url_tests {
|
||||
{
|
||||
var helloUrl = url.parse('http://example.com/?hello=world', true);
|
||||
if (typeof helloUrl.query !== 'string') {
|
||||
assert.equal(helloUrl.query.hello, 'world');
|
||||
assert.equal(helloUrl.query['hello'], 'world');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user