I wonder if there is any way to obtain IntelliSense for JavaScript classes in other files in Visual Studio 2015? I am using node tools for visual studio (NTVS 1.2) As an example I created a node project and added a javascript file 'test.js':
var Polygon = class Polygon {
constructor(height, width) {
this.height = height;
this.width = width;
};
hi() { return 'hi' };
};
Polygon.hello = function hello () { return 'hello' };
Polygon.prototype.yo = function yo () { return 'yo' };
module.exports = Polygon;
In the server.js file I have:
var Polygon = require('./public/js/test.js');
var p = new Polygon(1, 1);
The 'hi' function shows up in IntelliSense on the 'p' object, but not 'hello' and 'yo', even though it is possible to use them in the server.js file as Polygon.hello() and p.yo().