Design Patterns In TypeScript — Factory

How to create an object without exposing the creation logic

Photo made with Canva.