Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/RefactoringGuru/design-patterns-typescript
Design Pattern Examples in TypeScript
https://github.com/RefactoringGuru/design-patterns-typescript
design-patterns typescript
Last synced: 7 days ago
JSON representation
Design Pattern Examples in TypeScript
- Host: GitHub
- URL: https://github.com/RefactoringGuru/design-patterns-typescript
- Owner: RefactoringGuru
- License: other
- Created: 2018-05-11T11:00:29.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2024-05-18T11:14:06.000Z (6 months ago)
- Last Synced: 2024-10-16T09:05:48.153Z (26 days ago)
- Topics: design-patterns, typescript
- Language: TypeScript
- Homepage: https://refactoring.guru/design-patterns/typescript
- Size: 181 KB
- Stars: 1,049
- Watchers: 19
- Forks: 159
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Design Patterns in TypeScript
This repository is part of the [Refactoring.Guru](https://refactoring.guru/design-patterns) project.
It contains TypeScript examples for all classic GoF design patterns. Each pattern includes two examples:
- [x] **Conceptual** examples show the internal structure of patterns, including detailed comments.
- [x] **RealWorld** examples show how patterns can be used in real-world web applications.
## Requirements
For simplicity reasons, the examples are console apps. In order to launch them, you have to install [Node.js and NPM](https://nodejs.org/en/) on your computer and then install [TypeScript compiler](https://github.com/Microsoft/TypeScript) and [TypeScript Node extension](https://github.com/TypeStrong/ts-node) like this:
```
npm install -g typescript
npm install -g ts-node
```When you have all the required software installed, the examples can be launched via the command line as follows:
```
ts-node src/Path-to-example/Example.ts
```For the best experience, I recommend working with examples with these IDEs:
- [WebStorm](https://www.jetbrains.com/webstorm/)
- [Visual Studio Code](https://code.visualstudio.com/)## Contributor's Guide
I appreciate any help, whether it's a simple fix of a typo or a whole new example. Please read the [Contributor's Guide](CONTRIBUTING.md) to get more information.
## License
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
## Credits
Authors: Alexey Pyltsyn ([@lex111](https://github.com/lex111)) and Alexander Shvets ([@neochief](https://github.com/neochief))
Contributors: [See the list of contributors](https://github.com/RefactoringGuru/design-patterns-typescript/graphs/contributors)