/**
 * Singleton is a creational design pattern which ensures that
 * a class has only one instance, while providing a global access
 * point to this instance.
 */ class Singleton { private static instance : Singleton ; private constructor ( ) { } public static getInstance ( ) { if ( Singleton . instance === undefined ) { Singleton . instance = new Singleton ( ) ; } return Singleton . instance ; } } export default Singleton ;