Design Pattern: Abstract Factory Pattern in TypeScript
We can generate multiple factories using the Abstract factory pattern. This article discusses the Abstract Factory pattern implementations in TypeScript.
We can generate multiple factories using the Abstract factory pattern. This article discusses the Abstract Factory pattern implementations in TypeScript.
Factory pattern is used when we don’t want to instantiate objects directly, instead, we want to generate the instance(s) based on some criteria. The factory is responsible for generating the objects. This article demonstrates Factory pattern implementations in TypeScript.
Singleton pattern generates and returns the same single instance of a class, in any case. No matter how we generate the instance and how many times we generate it, the same single instance will be returned. This article discusses the Singleton pattern implementation in TypeScript.