mmahareeq / Design-Patterns-TypeScript

This repository provides an overview and implementation examples of various design patterns using TypeScript.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Design-Patterns-TypeScript

A collection of design patterns implemented using TypeScript.

Introduction

This repository provides an overview and implementation examples of various design patterns using TypeScript. Each design pattern has its own directory containing the code example, along with a brief explanation of the pattern, its purpose, and use cases.

Design patterns are reusable solutions to common software design problems. They provide a way to organize code and address common challenges in a structured and maintainable manner. Understanding and applying design patterns can improve code quality, extensibility, and readability.

Design Patterns Covered

This repository covers the following design patterns:

  1. Creational Design Patterns
    1. Singleton
    2. Factory Method
    3. Builder Pattern
  2. Structural Design Patterns
    1. Adapter Pattern (soon)
  3. Behavioral Design Patterns

Installation

To use the code examples, follow these steps:

Clone the repository:

git clone https://github.com/mmahareeq/Design-Patterns-TypeScript.git

Navigate to the cloned directory:

cd Design-Patterns-TypeScript

Usage

Each design pattern has its own directory, containing a separate JavaScript file and any necessary additional files. To run a specific example:

  1. Navigate to the directory of the desired design pattern: cd creational-patterns

  2. install typescript npm install -g typescript

  3. compile a typescript file tsc file-name.ts

  4. run node file-name.js

About

This repository provides an overview and implementation examples of various design patterns using TypeScript.


Languages

Language:TypeScript 100.0%