I have functions which are return objects. I wish to put their jsdoc definitions to see their property and methods on webstorm intellisense.
How do I have to 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 this object is instantiated
return {
someMethod : myMethod,
someOtherMethod : myOtherMethod
};
}