Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/gabrielleandro0801/typescript-design-patterns

Design Patterns examples in Typescript
https://github.com/gabrielleandro0801/typescript-design-patterns

design-patterns nodejs typescript

Last synced: 6 days ago
JSON representation

Design Patterns examples in Typescript

Awesome Lists containing this project

README

        

# Typescript Design Patterns
Repository with examples of Design Patterns in Typescript

## Result
It is the pattern used to avoid throwing **exceptions** in the code.

So, each method will return either an error or a success, where the client will decide how to handle the response.

## Singleton
It is the pattern used to prevent a class from being instantiated multiple times.

The class owns a [getInstance] method and turns its constructor into private.

Then, the clients will use this method to get the class instance.

## Running :computer:
Run the **package.json** scripts.

For example,
``` shell
npm run result-v1
```