0

I use webstorm ide with nodejs. When I create modules and require them, I don't have code completion.

For example:

test.js

/** @module test*/
module.exports = {
    run: function () {}
};

main.js

var test = require(__dirname+"/test.js");
test. //code completion does not offer "run"

I haven't found anything about module usages in jsdoc 3 documentation yet. :S

inf3rno
  • 24,976
  • 11
  • 115
  • 197

1 Answers1

0
var test = require("./test.js");
test. //code completion offers "run"

So you have to use "." instead of __dirname.

inf3rno
  • 24,976
  • 11
  • 115
  • 197