Quantcast
Channel: Node.js Tools for Visual Studio
Viewing all articles
Browse latest Browse all 4630

Closed Issue: Need to specialize array.push [1193]

$
0
0
Mongoose quick start does:

```
var db = mongoose.connection;
db.on('error', console.error.bind(console, 'connection error:'));
db.once('open', function callback () {
// yay!
});
```

connection is ultimately determined by an array which has a value pushed in, and so we get no completions on db because we know nothing about it's type.

We also don't get the on methods probably because we're not understanding:
```
Connection.prototype.__proto__ = EventEmitter.prototype;
```
Comments: Verified on build 20926.01 and works. Closing.

Viewing all articles
Browse latest Browse all 4630

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>