Unresolved class function
Hi,
I have an issue where I get "unresolved function or method" on a class member.
The setup is as follows:
cls.js - The class def:
class CLS {
constructor() {}
boo() {
console.log('boo');
}
}
module.exports = CLS;
fact.js - Some module that exports a function that returns instance of the class
var CLS = require('./cls.js');
/**
*
* @returns {CLS}
*/
module.exports = function() {
return new CLS();
};
main.js - My code that uses the above
var cls = require('./fact.js');
cls().boo();
Under "boo" I get the "unresolved" warning (see pic).

Here is the sample project:
https://expirebox.com/download/2a32d8a1f3c1b4a1490680ce56cd1f54.html
Thx!
Please sign in to leave a comment.
Known issue, please vote for https://youtrack.jetbrains.com/issue/WEB-24976 and linked tickets