This query is concerning the PhpStorm IDE.
I do know I am not on Jetbrains, however I couldn’t get any assist there, neither of their assist boards. As WP is written in PHP, I considered posting my query right here, as there are additionally probably others with this drawback:
Once I change the signature of a js operate that has sort info in its JsDoc; like for instance:
/**
* @param {string} phrase - Phrase used because the greeting
*/
operate sayHi( phrase ){ console.log(phrase); }
After which apply the signature refactoring to alter for instance simply the title, what I get is:
/**
* @param {string} phrase - Phrase used because the greeting
*/
operate sayHiThere( phrase :string ){ console.log(phrase); }
I’ve spent two hours now additionally on making an attempt to eliminate this drawback alone with out success. All I might discover out is that, when you specify the sorts of your operate parameters, PHPStorm mechanically provides that sort to your operate signature in case of a signature refactoring; turning your signatures and thus truly your complete code into invalid javascript! How can the automated addition of on this case :string
be turned off, whereas nonetheless with the ability to use the {string}
documentation within the @param
line?