Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
D

design_patterns_in_typescript

> 设计协作
Open source

:triangular_ruler: Design pattern implementations in TypeScript

5.4K stars0 likes6 views
WebsiteGitHub

About

:triangular_ruler: Design pattern implementations in TypeScript

Design Patterns in TypeScript

Here are the implementations of the following design patterns in TypeScript:

Creational

  • Singleton
  • Abstract Factory
  • Factory Method
  • Builder
  • Prototype

Structural Patterns

  • Adapter
  • Bridge
  • Composite
  • Decorator
  • Facade
  • Flyweight
  • Proxy

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:

bash
node patterns.js

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

TypeScriptadapterbuildercommandcomposite

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category设计协作
PricingOpen source

> Related tools

F
Figma
协作式界面设计工具
S
sketch-wakatime
Sketch plugin for automatic time tracking and metrics generated from your Sketch usage.
Q
QuickColor
Quickly apply fills from the global or document color palettes to selected elements - 🎨