I've been building an Angular 2/Typescript project in Visual Studio Code, and assiduously adding JSDoc comment blocks, but I'd now like to view the JSDoc output. I could install and set up my own JSDoc generation system, but given all the nice GUI support in VSC it seems reasonable to be able generate and view the JSDoc right from VSC.
My Google-Fu has been failing me; every time I look for "Generating JSDoc Output within Visual Studio Code" I just get plugins to generate JSDoc comment blocks.
Are there methods of generating and viewing JSDoc output within Visual Studio Code?
If you'd like to read these release notes online, go to Updates on code.visualstudio.com. Watch the release party: Listen in as the VS Code team discusses some of the new features. You can find the recording of the event on our YouTube channel.
Markdown preview To switch between views, press Ctrl+Shift+V in the editor. You can view the preview side-by-side (Ctrl+K V) with the file you are editing and see changes reflected in real-time as you edit.
To display the Output window whenever you build a project, in the Options dialog box, on the Projects and Solutions > General page, select Show Output window when build starts.
AFAIK there is no built in support, but I don't think it's necessary, as you could easily add a task that would run the appropriate jsdoc command. I don't know if this is what you mean by "setting up your own JSDoc generation system", but it's done quickly:
npm install -g jsdoc
(assuming you have node.js / npm).The place I've found the jsdocs helpful within vscode is for intellisense.
Say I have this function
/**
* This squares a function
* @param x takes this value and doubles it
*/
function myAwesomeFunction(x: number) {
return x *x;
}
Then vscode will show me this descriptive jsdocs whenever I try and call the function.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With