TypeScript and the Singleton Pattern