[resolved] how to quickly add comments to a method by webstorm

Business background

when writing code, you often have to write comments.
it doesn"t matter if you write some comments normally,
but writing comments to a method is especially troublesome

.
  • to describe what the method is
  • also specify what each parameter means, and the data type
  • also indicate what is returned

it takes time to play hand by hand. After studying the live template in the settings, it doesn"t seem to solve my needs

.

example

// 
// cateId Number id
// isReachBottom Boolean 
// return Array 
getContent (cateId, isReachBottom) {...}

question

is to write a method, through what shortcut, to automatically generate the above remarks. Of course, the specific types and explanations must be filled in
, but can the names of each parameter be automatically generated

?
Mar.14,2021

enter / * above the method, and then enter


you can try / * + enter

Menu