This is a collection of known design patterns and some sample code how to implement them in Typescript. Every pattern has a small list of example.
Note that this project requires node v4.x.x or higher and npm 2.14.7.
You must have ts-node
installed as global.
npm install -g ts-node
git clone https://github.com/zender/design-patterns.git
cd design-patterns
npm install
npm test
The patterns can be structured in roughly three different categories. Please click on the link for a full explanation of the pattern.
Please feel free to fork and extend existing or add your own examples and send a pull request with your changes!