Singleton Design Pattern in TS
Used for creating objects only once
eg: db conn object etc.
Important point:
Never use new keyword for the singleton, always make the constructor private and expose a getInstance() method
Why? the purpose of the new keyword is to create fresh ne...
arcade.hashnode.dev2 min read