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:
Oliver Joseph Ash
2017-12-05 12:23:41 +00:00
parent 63cf621848
commit 6ad156cd17

View File

@@ -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');
}
}