We consider documenting code a very important part of writing code (almost just as important as adding type annotations). So we have special help to make this a painless and enjoyable process.
Single line comments / multiline comments / JSDoc style comments extend the way you would expect
TIP: you can break out of a single comment chain by using the toggle comment
Ctrl|⌘ + /command.
JSDoc comments (comments that start with
/**) are the defacto way to document your variables / types etc. We have special love for them too.
Quick JSDoc snippet
// and press
Tab to get quick jsDoc snippet.
Big JSDoc snippet
/// and press
Tab to get a big jsDoc snippet.
Sometimes you just want a big comment block to document a portion of code (instead of a single declaration like a class / variable for which you would use JSDoc).
//// and press
Tab to get a big section comment.