Awesome Open Source
Awesome Open Source

Design Patterns in TypeScript

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


Structural Patterns

Behavioral Patterns

Compile the project

$ git clone
$ 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:

node patterns.js

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Typescript (246,644
Design Patterns (1,907
Command (991
Builder (695
Adapter (596
Related Projects