Home > Enterprise >  Put * before each line of comment in TypeScript file in VS Code IDE
Put * before each line of comment in TypeScript file in VS Code IDE

Time:10-18

I use VS Code and I want the comments that I write on several lines in Typescript language to be as follows (pay attention to the star character)

/**
 *@desc any text
 * any text
 */

But when I am writing a comment and I press enter, a star is not automatically created for the next line

/**
 *@desc any text
 any text
 */

So far, I have tested the following extensions on this date, but they did not solve this problem

  1. Auto Comment Blocks
  2. Comment Snippets
  3. Better Comment
  4. TSDoc Comment

CodePudding user response:

It works (for me) if you put a space after the star, which is common practice anyway:

/**
 * @desc any text<Enter>
 * 
 ^^ This star and space inserted automatically.

CodePudding user response:

Look in the preferences of VS Code and activate JSDOC

  • Related