webstorm - JSDOC and Revealing Module Pattern -


i have functions return objects. wish put jsdoc definitions see property , methods on webstorm intellisense.

how have write jsdoc of below functions?

function myotherfunc() {   return { a:'for eg string', b:12 } }  function myfunc() {   var prop = myotherfunc();    function mymethod() {     alert( 'my method' );   }    function myothermethod() {     alert( 'my other method' );   }    // explicitly return public methods when object instantiated   return {     somemethod : mymethod,     someothermethod : myothermethod   };       } 

this exact case handled in webstorm without jsdoc too, may use closure compiler type syntax this:

/**  * @return {{a: string, b: number}}  */ function myotherfunc() {     return { a:'for eg string', b:12 } } 

Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -