エントリーの編集
エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
記事へのコメント2件
- 注目コメント
- 新着コメント
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています
- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
TypeScriptでSingletonパターンを実装する - Qiita
class Singleton { private static _instance:Singleton = null; constructor() { if(Singleton._instan... class Singleton { private static _instance:Singleton = null; constructor() { if(Singleton._instance){ throw new Error("must use the getInstance."); } Singleton._instance = this; } public static getInstance():Singleton { if(Singleton._instance === null) { Singleton._instance = new Singleton(); } return Singleton._instance; } }



2014/03/14 リンク