Skip to content

Instantly share code, notes, and snippets.

@shikumiya-hata
Created October 21, 2020 09:55
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/d3adbed042e1b73f65927bf3eda29931 to your computer and use it in GitHub Desktop.
Save shikumiya-hata/d3adbed042e1b73f65927bf3eda29931 to your computer and use it in GitHub Desktop.
class Foo {
constructor() {
this._bar = 0
}
/**
* hogeメソッド
* @return {bool} - true固定
*/
hoge() {
return true
}
/**
* barプロパティのgetter
* @return {int} - vaプロパティの値
*/
get bar() {
return this._bar
}
/**
* barプロパティのsetter
* @param {int} value - vaプロパティにセットする値
*/
set bar(value) {
this._bar = value
}
}
/**
* Fooクラスを取得する
* @return {Foo} - Fooクラス
*/
function foo() { return Foo } // クラスを取得する
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment