Skip to content

Latest commit

 

History

History
105 lines (78 loc) · 3.26 KB

File metadata and controls

105 lines (78 loc) · 3.26 KB

TypeScript design patterns study

Playground for studying design patterns, solid principles, GoF, testing and more with TypeScript

Index

Introduction

This repo has been created to study design patterns, solid principles, GoF, testing and more with TypeScript.

Folder structure

All topics are in the src folder, separated by they topic. All topic has an README.md file and his sub topics as well.

Running App

To install follow these steps:

Clone the repo

git clone [email protected]:deverebor/typescript-design-patterns-study.git

Enter the repo directory

cd typescript-design-patterns-study

Install the dependencies

npm i

Using the project

Follow these steps:

  • npm run start:srp - single responsibility principle
  • npm run start:ocp - open closed principle
  • npm run start:lsp - liskov substitution principle
  • npm run start:isp - interface segregation principle
  • npm run start:dip - dependency inversion principle
  • npm run start:legacy
  • npm run test - test the project
  • npm run test:silent - silent with watch test
  • npm run test:coverage - to generate coverage report
  • creational
    • Singleton - npm run creational:singleton
    • Builder - npm run creational:builder
    • ProtoType
      • npm run creational:proto-deep - Deep Clone
      • npm run creational:proto-shallow - Shallow Clone
      • npm run creational:proto-js-obj - JS Object Clone
      • npm run creational:proto-js-func - JS Function Clone
    • FactoryMethod - npm run creational:factory
    • AbstractFactory - npm run creational:abstract-factory
  • structural
    • Composite
      • npm run structural:composite-classic - Classic Structure
      • npm run structural:composite-validation - Validation Structure
    • Adapter - npm run structural:adapter
    • Bridge - npm run structural:bridge
    • Decorator - npm run structural:decorator
    • Facade - npm run structural:facade
    • Proxy - npm run structural:proxy
    • Flyweight - npm run structural:flyweight
  • behavioral
    • Strategy - npm run behavioral:strategy
    • Command - npm run behavioral:command
    • Memento - npm run behavioral:memento
    • State - npm run behavioral:state
    • Mediator - npm run behavioral:mediator

Initialize the project you want

npm run start:dip

Developer with ❤️‍🔥 by Lucas Souza (@deverebor)