PhpStorm 8.0.3 Node.js Connect use() undefined function or method

PhpStorm 8.0.3 Node.js Connect use()  undefined function or method.  It seems to work but I am not getting the all is ok Green Box on the top right.

2 comments
Comment actions Permalink

problem is caused by the way use(0 is defined in connect module:

module.exports = createServer;
var proto = {};
function createServer() {
  function app(req, res, next){ app.handle(req, res, next); }
  merge(app, proto);
  merge(app, EventEmitter.prototype);
  app.route = '/';
  app.stack = [];
  return app;
}
proto.use = function use(route, fn) {...}



Such dynamically added properties can hardly be resolved during static analysis

0
Comment actions Permalink

Great answer. Thanks!


0

Please sign in to leave a comment.