Javascript – Instance of decorated class not working with instanceof
I have class decorator which ensures that the class remains a singleton. interface Type<T = any> extends Function { new (...args: any[]): T; } function Singleton() { let instance: Object; return function <SingletonFunction extends Type>( constructor: SingletonFunction ) { return…