vmware-archive / scripted

The Scripted code editor
Eclipse Public License 1.0
1.56k stars 166 forks source link

Nonsense content assist for commonjs module that exports just a single function. #262

Closed kdvolder closed 11 years ago

kdvolder commented 11 years ago

For example the 'json-merge.js' module in scripted itself.

When I import that module like so:

var jsonMerge = require('./jsdepend/json-merge');
jsonMerge.

Now press ctrl-space after the . The content assist is full of garbage, including internal functions not exported from the module at all.

aeisenberg commented 11 years ago

Mostly fixed. Content assist now shows the jsonMerge variable is a function that returns a number. The return value is incorrect, but I think that is a different problem. The inferencer is getting conused by the line var merged = args[0];.I will reaise new issue for that.

I am resolving this issue.