├── .gitignore ├── README.md ├── package.json ├── src ├── abstract-factory │ ├── README.md │ ├── abstract-factory.png │ ├── abstract-factory.ts │ └── demo.ts ├── adapter │ ├── README.md │ ├── adapter-for-object.png │ ├── adapter.ts │ └── demo.ts ├── builder │ ├── README.md │ ├── builder.png │ ├── builder.ts │ └── demo.ts ├── chain-of-responsibility │ ├── README.md │ ├── chain-of-responsibility.png │ ├── chain-of-responsibility.ts │ └── demo.ts ├── decorator │ ├── README.md │ ├── decorator.png │ ├── decorator.ts │ └── demo.ts ├── facade │ ├── README.md │ ├── demo.ts │ ├── facade.png │ └── facade.ts ├── factory-method │ ├── README.md │ ├── demo.ts │ ├── factory-method.png │ └── factory-method.ts ├── flyweight │ ├── README.md │ ├── demo.ts │ └── flyweight.ts ├── iterator │ ├── README.md │ ├── demo.ts │ └── iterator.ts ├── main.ts ├── mediator │ ├── README.md │ ├── demo.ts │ ├── mediator.png │ └── mediator.ts ├── observer │ ├── README.md │ ├── demo.ts │ ├── observer-pattern-class-diagram.png │ ├── observer-pattern.png │ └── observer.ts ├── prototype │ ├── README.md │ ├── demo.ts │ ├── prototype.jpg │ ├── prototype.ts │ └── prototype_uml.png ├── proxy │ ├── README.md │ ├── demo.ts │ └── proxy.ts ├── singleton │ ├── README.md │ ├── demo.ts │ ├── singleton.png │ └── singleton.ts ├── state │ ├── README.md │ ├── demo.ts │ ├── state.png │ └── state.ts ├── strategy │ ├── README.md │ ├── demo.ts │ ├── strategy.png │ └── strategy.ts └── template-method │ ├── README.md │ ├── demo.ts │ ├── template-method.png │ └── template-method.ts └── tsconfig.json /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/.gitignore -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/README.md -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/package.json -------------------------------------------------------------------------------- /src/abstract-factory/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/abstract-factory/README.md -------------------------------------------------------------------------------- /src/abstract-factory/abstract-factory.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/abstract-factory/abstract-factory.png -------------------------------------------------------------------------------- /src/abstract-factory/abstract-factory.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/abstract-factory/abstract-factory.ts -------------------------------------------------------------------------------- /src/abstract-factory/demo.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/abstract-factory/demo.ts -------------------------------------------------------------------------------- /src/adapter/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/adapter/README.md -------------------------------------------------------------------------------- /src/adapter/adapter-for-object.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/adapter/adapter-for-object.png -------------------------------------------------------------------------------- /src/adapter/adapter.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/adapter/adapter.ts -------------------------------------------------------------------------------- /src/adapter/demo.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/adapter/demo.ts -------------------------------------------------------------------------------- /src/builder/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/builder/README.md -------------------------------------------------------------------------------- /src/builder/builder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/builder/builder.png -------------------------------------------------------------------------------- /src/builder/builder.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/builder/builder.ts -------------------------------------------------------------------------------- /src/builder/demo.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/builder/demo.ts -------------------------------------------------------------------------------- /src/chain-of-responsibility/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/chain-of-responsibility/README.md -------------------------------------------------------------------------------- /src/chain-of-responsibility/chain-of-responsibility.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/chain-of-responsibility/chain-of-responsibility.png -------------------------------------------------------------------------------- /src/chain-of-responsibility/chain-of-responsibility.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/chain-of-responsibility/chain-of-responsibility.ts -------------------------------------------------------------------------------- /src/chain-of-responsibility/demo.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/chain-of-responsibility/demo.ts -------------------------------------------------------------------------------- /src/decorator/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/decorator/README.md -------------------------------------------------------------------------------- /src/decorator/decorator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/decorator/decorator.png -------------------------------------------------------------------------------- /src/decorator/decorator.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/decorator/decorator.ts -------------------------------------------------------------------------------- /src/decorator/demo.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/decorator/demo.ts -------------------------------------------------------------------------------- /src/facade/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/facade/README.md -------------------------------------------------------------------------------- /src/facade/demo.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/facade/demo.ts -------------------------------------------------------------------------------- /src/facade/facade.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/facade/facade.png -------------------------------------------------------------------------------- /src/facade/facade.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/facade/facade.ts -------------------------------------------------------------------------------- /src/factory-method/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/factory-method/README.md -------------------------------------------------------------------------------- /src/factory-method/demo.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/factory-method/demo.ts -------------------------------------------------------------------------------- /src/factory-method/factory-method.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/factory-method/factory-method.png -------------------------------------------------------------------------------- /src/factory-method/factory-method.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/factory-method/factory-method.ts -------------------------------------------------------------------------------- /src/flyweight/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/flyweight/README.md -------------------------------------------------------------------------------- /src/flyweight/demo.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/flyweight/demo.ts -------------------------------------------------------------------------------- /src/flyweight/flyweight.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/flyweight/flyweight.ts -------------------------------------------------------------------------------- /src/iterator/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/iterator/README.md -------------------------------------------------------------------------------- /src/iterator/demo.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/iterator/demo.ts -------------------------------------------------------------------------------- /src/iterator/iterator.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/iterator/iterator.ts -------------------------------------------------------------------------------- /src/main.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/main.ts -------------------------------------------------------------------------------- /src/mediator/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/mediator/README.md -------------------------------------------------------------------------------- /src/mediator/demo.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/mediator/demo.ts -------------------------------------------------------------------------------- /src/mediator/mediator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/mediator/mediator.png -------------------------------------------------------------------------------- /src/mediator/mediator.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/mediator/mediator.ts -------------------------------------------------------------------------------- /src/observer/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/observer/README.md -------------------------------------------------------------------------------- /src/observer/demo.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/observer/demo.ts -------------------------------------------------------------------------------- /src/observer/observer-pattern-class-diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/observer/observer-pattern-class-diagram.png -------------------------------------------------------------------------------- /src/observer/observer-pattern.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/observer/observer-pattern.png -------------------------------------------------------------------------------- /src/observer/observer.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/observer/observer.ts -------------------------------------------------------------------------------- /src/prototype/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/prototype/README.md -------------------------------------------------------------------------------- /src/prototype/demo.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/prototype/demo.ts -------------------------------------------------------------------------------- /src/prototype/prototype.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/prototype/prototype.jpg -------------------------------------------------------------------------------- /src/prototype/prototype.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/prototype/prototype.ts -------------------------------------------------------------------------------- /src/prototype/prototype_uml.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/prototype/prototype_uml.png -------------------------------------------------------------------------------- /src/proxy/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/proxy/README.md -------------------------------------------------------------------------------- /src/proxy/demo.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/proxy/demo.ts -------------------------------------------------------------------------------- /src/proxy/proxy.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/proxy/proxy.ts -------------------------------------------------------------------------------- /src/singleton/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/singleton/README.md -------------------------------------------------------------------------------- /src/singleton/demo.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/singleton/demo.ts -------------------------------------------------------------------------------- /src/singleton/singleton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/singleton/singleton.png -------------------------------------------------------------------------------- /src/singleton/singleton.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/singleton/singleton.ts -------------------------------------------------------------------------------- /src/state/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/state/README.md -------------------------------------------------------------------------------- /src/state/demo.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/state/demo.ts -------------------------------------------------------------------------------- /src/state/state.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/state/state.png -------------------------------------------------------------------------------- /src/state/state.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/state/state.ts -------------------------------------------------------------------------------- /src/strategy/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/strategy/README.md -------------------------------------------------------------------------------- /src/strategy/demo.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/strategy/demo.ts -------------------------------------------------------------------------------- /src/strategy/strategy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/strategy/strategy.png -------------------------------------------------------------------------------- /src/strategy/strategy.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/strategy/strategy.ts -------------------------------------------------------------------------------- /src/template-method/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/template-method/README.md -------------------------------------------------------------------------------- /src/template-method/demo.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/template-method/demo.ts -------------------------------------------------------------------------------- /src/template-method/template-method.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/template-method/template-method.png -------------------------------------------------------------------------------- /src/template-method/template-method.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/src/template-method/template-method.ts -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/semlinker/typescript-design-patterns/HEAD/tsconfig.json --------------------------------------------------------------------------------