Created
October 21, 2020 09:55
-
-
Save shikumiya-hata/d3adbed042e1b73f65927bf3eda29931 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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