WebStorm, autocomplete inherited methods

Hello, strange, but cant found how to get autocomplete of inherited methods.
I have class A with some methods.
And class B which extended from class A and inherits All his methods.
I document that they are both @constructor, and B @extends A
but
instance = new B();
instance.
and I see only methods of B class.Any suggestions?

0
5 comments

Please provide complete self contained snippet

0

/**
* @constructor
*/
function AClass() {}
AClass.prototype.method = function(){};

/**
* @constructor
* @extends AClass
*/
function BClass() {}
extend(BClass, AClass);
BClass.prototype.anotherMethod = function(){};

function extend(Child, Parent) {
    var F = new Function();
    F.prototype = Parent.prototype;
    Child.prototype = new F();
    Child.prototype.constructor = Child;
    Child.superclass = Parent.prototype;
}

var aInstance = new AClass();
aInstance. <<< .method on top, and bold

var bInstance = new BClass();
bInstance. <<< only .anotherMethod on top, and bold, no inherited .method



Attachment(s):
bInstanceMethods.png
aInstanceMethods.png
0

method is present in completion for me, intermixed with Object variants (WebStorm currently does not group variants for base classes)

0

"intermixed"
no, i want to clearly know which methods my instance realy have.
and It is completly unusable even when u have about 20 classes with 10 methods.

0

WebStorm shows completion variants in following order: <Members><Inherited Members><All other symbols>,
smart completion leaves only first / second groups.
We have ticket for grouping members by declared type (WI-4973).

0

Please sign in to leave a comment.