Design patterns are typical solutions to common problems in software design. Each pattern is like a blueprint that you can customize to solve a particular design problem in your code.
-
Creational - provide object creation mechanisms that increase flexibility and reuse of existing code.
- Singleton
- Factory Method
- Builder
- Abstract Factory
- Prototype
-
Structural - explain how to assemble objects and classes into larger structures while keeping the structures flexible and efficient.
- Decorator
- Adapter
- Facade
- Proxy
- Composite - not implemented yet
- Bridge - not implemented yet
- Flyweight - not implemented yet
-
Behavioral - take care of effective communication between objects and make the design more flexible and reusable.
- Observer
- Strategy
- Iterator
- Command
- Chain of Responsibility
- Mediator - not implemented yet
- Memento - not implemented yet
- State - not implemented yet
- Template Method - not implemented yet
- Visitor - not implemented yet
For executing TypeScript codes compile the code by running npm run compile in terminal. Corresponding dist folder will appear according to tsconfig.json configuration which will contain .js files which were compiled from .ts files. These javascript files can be used by the browser.
Execute npm run serve to start the server. Open the destination path into browser to see the results.
OR
View and Edit (Fork) online via Stackblitz live example