export function Singleton() { class SingletonT { protected constructor() {} private static _Instance: SingletonT|null = null; public static get Instance(): T { if(SingletonT._Instance == null) { SingletonT._Instance = new this(); } return SingletonT._Instance as T; } } return SingletonT; }