1

I'm dealing with a module pattern in WebStorm's live inspection that I'm trying to comment.
And I don't want to use AMD/CJS.

;
My = (window.My || {});
My.Module = (My.Module || {});
My.Module.MyClass = (/**
 *
 * @param {My.Module.MyAnotherClass} MyAnotherClass
 */
    function (MyAnotherClass) {
    'use strict';

    /**
     * @class
     */
    var MyClass = function() {
        // constructor
    };

    /**
     * My sexy method.
     * @param {string} s
     */
    MyClass.prototype.myMethod= function(s) {
        var test = new MyAnotherClass(s);
    };

    return MyClass;
})(My.Module.MyAnotherClass);

Pretend that "MyAnotherClass" has the same type of comment. My issue is when I'm trying this : var test = new MyAnotherClass(s);, WebStorm is telling me that Method expression is not of Function type.

What can I do ?

Tell me if you need more information and sorry for my bad english.

L.

EDIT: It seems that removing the very first comment block with param definition is resolving the issue ... but I don't feel like it's the best way to go.

EDIT2: Same issue with property from an abstract class

Amio.io
  • 20,677
  • 15
  • 82
  • 117
lsagetlethias
  • 328
  • 2
  • 14
  • I have just asked the same: http://stackoverflow.com/q/37297061/1075289 Yet, I will not mark it as duplicate as it varies a little. Have you solved your issue while keeping the very first comment? – Amio.io May 18 '16 at 10:45

0 Answers0