1class MyClass
2{
3 private static _instance: MyClass;
4
5 private constructor()
6 {
7 //...
8 }
9
10 public static get Instance()
11 {
12 // Do you need arguments? Make it a regular static method instead.
13 return this._instance || (this._instance = new this());
14 }
15}
16
17const myClassInstance = MyClass.Instance;