Answer the question
In order to leave comments, you need to log in
Why doesn't autocomplete work in PhpStorm|WebStorm for JS objects?
For some reason, the methods and properties of objects in PhpStorm's autocomplete are not picked up (in WebStorm - also, specially set):
Although,
module.exports = class RepeatResultDTO {
/**
* @param repeatResultBool
* @param resultPower 0 - is default action; 1-N move step.
*/
constructor(repeatResultBool = true, resultPower = 0) {
this._resultBool = repeatResultBool;
this._resultPower = resultPower;
this.testVar = true;
}
/**
* @return {boolean}
*/
get resultBool() {
return this._resultBool;
}
/**
* @return {number}
*/
get resultPower() {
return this._resultPower;
}
testMethod()
{
return this.testVar;
}
}
Answer the question
In order to leave comments, you need to log in
The thing is that you need to export classes not like this:
module.exports = class SomeClass {
//...
}
class SomeClass {
//...
}
module.exports = SomeClass;
No one will help you better than the ide developers themselves :)
maybe some kind of bug, open a ticket here https://youtrack.jetbrains.com/issues/WEB
they always answer, quite quickly and if the problem is clear - they fix it, or they say that you you're doing it wrong.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question