랭킹으로 돌아가기
:triangular_ruler: Design pattern implementations in TypeScript
design-patternstypescriptadapterbuilderfacadecommandcomposite
주요 지표
스타 성장
스타
5.4k
포크
767
주간 성장
—
이슈
5
2k4k
2013년 7월2015년 9월2017년 11월2020년 1월2022년 3월2024년 5월2026년 7월
아티팩트npm
npm install design_patterns_in_typescriptREADME
Design Patterns in TypeScript
Here are the implementations of the following design patterns in TypeScript:
Creational
Structural Patterns
Behavioral Patterns
- Chain of Responsibility
- Command
- Interpreter
- Iterator
- Mediator
- Memento
- Observer
- State
- Strategy
- Template Method
- Visitor
Compile the project
$ git clone https://github.com/torokmark/design_patterns_in_typescript.git
$ cd design_patterns_in_typescript
$ tsc
There is a tsconfig.json file in the root directory which is responsible for the compiler options.
As it is set the default target is Ecmascript5 now.
Any additional options come here.
By default the output is a patterns.js file.
To compile only one pattern, use the following command.
$ cd design_patterns_in_typescript/visitor
$ tsc --target ES5 --module system --outFile visitor.js visitor.ts
Execute the project
After the compilation of the project, a patterns.js is generated by default.
Executing the file is:
node patterns.js
관련 저장소