vscode
vscode copied to clipboard
No intellisense when exporting es3 style class
- VSCode Version: 1.0.0
- OS Version: Windows 10 Enterprise
Steps to Reproduce:
- Create two js files.
moduleA.js
var constructorFunction = function () {};
constructorFunction.prototype.prototypeMethod = function () {};
module.exports = constructorFunction;
moduleB.js
var moduleA = require('./moduleA');
var constructedObject = new moduleA();
constructedObject.
- Try get intellisense suggestion after dot in moduleB.
- No intellisense provided.
- If I change code in moduleA as following:
function constructorFunction () {}
constructorFunction.prototype.prototypeMethod = function () {};
module.exports = constructorFunction;
intellisense in moduleB starts working.
Expected result: intellisense works no matter how exported function is defined.
@DenysYefimenko the change part reads exactly the same as in steps. e.g
function constructorFunction () {}
constructorFunction.prototype.prototypeMethod = function () {};
module.exports = constructorFunction;
Are we missing something ?
Yes, you do :) In changed part I declared constructorFunction without using var variable = function() {...} construction.
Thanks. Missed that.
Moving to TS.
This issue was moved to Microsoft/TypeScript#8144