3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

@paramってなんだ

Posted at

@paramとは

結論から行くと@paramというのはJSDocというツールのタグである

JSDocとは

JavaScript用のソースコードにデコレーターを追加するツール

主なタグ

  • @type
    • 変数の型を記述
  • @param 
    • 関数の名前、型を記述
  • @return
    • 戻り値の型を記述
  • @todo
    • 終わっていない課題を記述
  • @readonly
    • 読み取り専用を示す

実際の使用例

/**
*テスト変数
* @type {Number}
*/
const test = 10;

/**
*テスト関数
* @param {Number} arg1
* @param {String} arg2
* @return {Boolean}
*/

function test(arg1, arg2) {
  return false
}

参考資料

3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?