Closed akshat46 closed 3 years ago
@akshat46 Thank you for using vim-jsdoc.
Yes, it's by design.
If you using TypeScript or FlowType, you may add return type and would generate @returns
/**
* setStart.
*
* @returns {Promis<any>}
*/
function setStart(): Promis<any> {}
If it's JavaScript, can't generate @return
. Because parser(vim-jsdoc use) did not parse function body.
(and I'm not changing the parser's behavior)
If you always want generate @return {}
You can create your own template and set like following.
let g:jsdoc_templates_path = '/path/to/your/jsdoc_template.js'
I see. I'll just create a temple then. Thanks! Great project!
I think this is currently the intended behavior? I saw similar stuff in the tutorial.
None of the functions have
@return
section but perhaps it should be added to the ones that do return something. If not by default, maybe there could be an option to include@return {}
if functions is returning non null.Sorry if this is already included. Didn't find anything in doc to change this behavior.