0

As I am not sure which responsibilities are taken by JSDoc and which by PhpStorm, I just describe a problem.

Imagine a simple class inheritance. All works fine except static method. You can see an example:

Static methods problem

As you can see B.s is not marked by PhpStorm as an inherited from A.s. And it is not marked by JSDoc with Overrides: A.s. Object methods (a) work nice. Another problem is that PhpStorm does not show upper arrow new function B as it shows for this.a. But it is only for start. Follow up.

It is very unlikely that you have all classes in one file. And I move class A into a separate file. Now it works well. But when I add a namespace problems appear. See A.js:

Namespace problem

And B.js:

B.js

As you can see. Now PhpStorm tells us only about A#a <> B#a connections.

So how can I solve these problems? Hacks are welcome.

LazyOne
  • 158,824
  • 45
  • 388
  • 391
FreeLightman
  • 2,224
  • 2
  • 27
  • 42
  • Added `webstorm` tag as it's shares the same JS code (PhpStorm = WebStorm + PHP + DB) – LazyOne Feb 28 '18 at 14:57
  • 1
    JSdoc doesn't support static members inheritance - see https://github.com/jsdoc3/jsdoc/issues/433, https://github.com/jsdoc3/jsdoc/issues/1229. And I can't suggest any workarounds for PhpStorm:( – lena Mar 01 '18 at 15:52

0 Answers0