问题
I am currently developing a NodeJS project and found out that there is no built in functionality to create JSDoc comments for functions/methods.
I am aware of the TypeScript definitions that exist but I couldn't really find anything to match what I need.
WebStorm, for example, has some pretty neat JSDoc functionalities. Can one somehow achieve a similar functionality?
回答1:
Visual Studio 1.10 is now able to generate JSDoc comments.
Just type /**
above the function
See Also:
- VS Code Docs > Languages > Javascript > JSDoc Support
- VS Code February 2017 Release Notes > Auto JSDoc Comments
回答2:
I really like "Document This".
Installation
Launch VS Code Quick Open (⌘+P), paste the following command, and press enter.ext install docthis
https://marketplace.visualstudio.com/items?itemName=joelday.docthis
It has some nice features like adding doc blocks to an entire file.
回答3:
Maybe give this JSDoc extension a try: https://marketplace.visualstudio.com/items/stevencl.addDocComments
You can install extensions in VS Code from View
> Command Palette
回答4:
A related one.
I was finding for Visual Studio 2017 Community edition, below helped:
https://marketplace.visualstudio.com/items?itemName=MichaelObermeyer.DocStubsJs2017
来源:https://stackoverflow.com/questions/34220564/is-there-a-way-to-generate-jsdoc-comments-in-visual-studio-code