JavaScript design patterns #2. Factories and their implementation in TypeScript | Heykuki News