-
Notifications
You must be signed in to change notification settings - Fork 38.2k
Closed
Description
Environments:
- VSCode Version: 1.13.0
- OS Version: Win 10 Pro, 1703 (Build 15063.332)
Extensions:
- Beautify 1.1.1
- C/C++ 0.11.4
- C# 1.10.0
- ESLint 1.2.11
- vetur 0.7.0
- vscode-icons 7.9.0
- webpack 2.0.0
- XML Tools 1.8.0
Issues:
The intellisense doesn't work when I import a constructor, but after I change the module.exports to an object, it seems right.
Steps to Reproduce:
- Create a file named 'mod.js', write these lines.
function Test(name) {
this.name = name;
}
Test.prototype.log = function (msg) {};
module.exports = Test;- Create another file named 'test.js'.
const Test = require('./mod');
let a = new Test('test');
a. // <- here, the intellisense cannot list the 'name' and 'log'- Then change the files.
'mod.js'
-module.exports = Test;
+module.exports = { Test };'test.js'
-let a = new Test('test');
+let a = new Test.Test('test');
a. // now the intellisense seems good.Screen record
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
