source: https://medium.com/swlh/design-patterns-in-typescript-singleton-part-1-of-5-bd3742b46589