Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shikumiya-hata/0a3b4d70bd9c154daa1599e83b27085e to your computer and use it in GitHub Desktop.
Save shikumiya-hata/0a3b4d70bd9c154daa1599e83b27085e to your computer and use it in GitHub Desktop.
/** 変数の説明 */
var variable1 = false
/** 変数の説明 */
let variable2 = false
/** 定数の説明 */
const CONSTANT1 = false
/**
* 関数の説明
* @param {int} arg1 - 引数の説明
* @param {int} arg2 - 引数の説明
* @return {bool} - 戻り値の説明
*/
function f(arg1, arg2) {
...
return true
}
/**
* クラスの説明
*/
class Foo {
/**
* コンストラクタ
* @param {int} argInt - 引数の説明
* @param {string} argString - 引数の説明
* @param {bool} argBool - 引数の説明
* @param {Array|Object} argAny - 引数の説明
*/
constructor(argInt, argString, argBool, argAny) {
...
}
/**
* メソッドの説明
* @param {int} a - 引数1の説明
* @param {int} b - 引数2の説明
* @return {int} - 戻り値の説明
*/
foo(a, b) {
return a + b
}
/**
* hogeのgetter
* @return {string} - hogeプロパティ値
*/
get hoge() {
return this._hoge
}
/**
* hogeのsetter
* @param {string} value - hogeプロパティにセットする値
*/
set hoge(value) {
this._hoge = value
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment