{"id":270,"date":"2010-12-11T19:58:00","date_gmt":"2010-12-11T18:58:00","guid":{"rendered":"http:\/\/www.speich.net\/articles\/?p=270"},"modified":"2019-10-06T12:30:18","modified_gmt":"2019-10-06T10:30:18","slug":"phpstorm-and-documenting-javascript","status":"publish","type":"post","link":"https:\/\/www.speich.net\/articles\/en\/2010\/12\/11\/phpstorm-and-documenting-javascript\/","title":{"rendered":"phpStorm and documenting JavaScript"},"content":{"rendered":"\n<p>I&#8217;m awed again and again by <a href=\"http:\/\/www.jetbrains.com\/phpstorm\/index.html\">phpStorm<\/a>&#8216;s features. I just came across this one: When I comment my JavaScript methods\/functions with the @param, all IDEs I have tried out so far, let you only set a primitive type in curly braces, e.g.:<\/p>\n\n\n\n<pre><code class=\"language-javascript\">\/**\n * Some method description.\n * @param {Object} deferred dojo.Deferred\n *\/\nsomeMethod: function(deferrede) {\n   \/\/ ...\n}<\/code><\/pre>\n\n\n\n<p>Anything else would be marked as an error. But phpStorm is a lot, lot smarter.&nbsp; When I&#8217;m using dojo it recognizes all classes and I can use them as a type, e.g.:<\/p>\n\n\n\n<pre><code class=\"language-javascript\"> \/**\n&nbsp;* Some method description.\n&nbsp;* @param {dojo.Deferred} deferred\n&nbsp;**\/\nsomeMethod: function(deferred) {\n  \/\/ ...\n}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m awed again and again by phpStorm&#8216;s features. I just came across this one: When I comment my JavaScript methods\/functions with the @param, all IDEs I have tried out so far, let you only set a primitive type in curly braces, e.g.: \/** * Some method description. * @param {Object} deferred dojo.Deferred *\/ someMethod: function(deferrede) &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.speich.net\/articles\/en\/2010\/12\/11\/phpstorm-and-documenting-javascript\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;phpStorm and documenting JavaScript&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[26,75],"class_list":["post-270","post","type-post","status-publish","format-standard","hentry","category-javascript","tag-dojo","tag-phpstorm","entry"],"_links":{"self":[{"href":"https:\/\/www.speich.net\/articles\/wp-json\/wp\/v2\/posts\/270","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.speich.net\/articles\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.speich.net\/articles\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.speich.net\/articles\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.speich.net\/articles\/wp-json\/wp\/v2\/comments?post=270"}],"version-history":[{"count":1,"href":"https:\/\/www.speich.net\/articles\/wp-json\/wp\/v2\/posts\/270\/revisions"}],"predecessor-version":[{"id":1691,"href":"https:\/\/www.speich.net\/articles\/wp-json\/wp\/v2\/posts\/270\/revisions\/1691"}],"wp:attachment":[{"href":"https:\/\/www.speich.net\/articles\/wp-json\/wp\/v2\/media?parent=270"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.speich.net\/articles\/wp-json\/wp\/v2\/categories?post=270"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.speich.net\/articles\/wp-json\/wp\/v2\/tags?post=270"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}