7

When working in C# using ReSharper + StyleCop I can auto generate basic documentation comments for methods, which looks something like:

    /// <summary>
    /// The login.
    /// </summary>
    /// <param name="returnUrl">
    /// The return Url.
    /// </param>
    /// <returns>
    /// The <see cref="Task"/>.
    /// </returns>

which I can then add extra detail into.

Is there a similar tool for TypeScipt which will generate the JSDoc comment sections so I can simply fill in the details?

2 Answers 2

6

ReSharper has a backlog item for this - Automated JavaScript Comments.

At the moment, you just have to type /** and then enter them yourself.

There are some extension that create vsdoc and jsdoc comments*.

*JSDoc added in v2.

Sign up to request clarification or add additional context in comments.

2 Comments

Interesting and I wonder how long would it take MSFT to do this? 5 minutes?
The vsdoc extension mentioned in this answer has been updated to support both JSDoc and TypeScript!
2

There's a nice little extension in the VS Code MarketPlace called Document This. Try that. Other options are : Comments in Typescript by S.Albert and DocStubsJs by Michael Obermeyer

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.