{"id":13496590,"url":"https://github.com/torokmark/design_patterns_in_typescript","last_synced_at":"2025-05-14T13:09:15.670Z","repository":{"id":9381395,"uuid":"11240760","full_name":"torokmark/design_patterns_in_typescript","owner":"torokmark","description":":triangular_ruler: Design pattern implementations in TypeScript","archived":false,"fork":false,"pushed_at":"2023-09-05T02:44:07.000Z","size":80,"stargazers_count":5297,"open_issues_count":7,"forks_count":763,"subscribers_count":174,"default_branch":"main","last_synced_at":"2025-04-11T06:12:32.604Z","etag":null,"topics":["adapter","builder","command","composite","design-patterns","facade","typescript"],"latest_commit_sha":null,"homepage":"http://torokmark.github.io/design_patterns_in_typescript/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/torokmark.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2013-07-07T21:49:06.000Z","updated_at":"2025-04-08T18:48:41.000Z","dependencies_parsed_at":"2022-07-16T13:16:12.691Z","dependency_job_id":"c272ea84-d231-48ff-bfd7-66efd00c9bc3","html_url":"https://github.com/torokmark/design_patterns_in_typescript","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/torokmark%2Fdesign_patterns_in_typescript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/torokmark%2Fdesign_patterns_in_typescript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/torokmark%2Fdesign_patterns_in_typescript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/torokmark%2Fdesign_patterns_in_typescript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/torokmark","download_url":"https://codeload.github.com/torokmark/design_patterns_in_typescript/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254149975,"owners_count":22022852,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adapter","builder","command","composite","design-patterns","facade","typescript"],"created_at":"2024-07-31T19:01:52.366Z","updated_at":"2025-05-14T13:09:10.656Z","avatar_url":"https://github.com/torokmark.png","language":"TypeScript","readme":"# Design Patterns in TypeScript #\n\nHere are the implementations of the following design patterns in TypeScript:\n\n### Creational ###\n\n* [Singleton](https://github.com/torokmark/design_patterns_in_typescript/tree/master/singleton)\n* [Abstract Factory](https://github.com/torokmark/design_patterns_in_typescript/tree/master/abstract_factory)\n* [Factory Method](https://github.com/torokmark/design_patterns_in_typescript/tree/master/factory_method)\n* [Builder](https://github.com/torokmark/design_patterns_in_typescript/tree/master/builder)\n* [Prototype](https://github.com/torokmark/design_patterns_in_typescript/tree/master/prototype)\n\n\n### Structural Patterns ###\n\n* [Adapter](https://github.com/torokmark/design_patterns_in_typescript/tree/master/adapter)\n* [Bridge](https://github.com/torokmark/design_patterns_in_typescript/tree/master/bridge)\n* [Composite](https://github.com/torokmark/design_patterns_in_typescript/tree/master/composite)\n* [Decorator](https://github.com/torokmark/design_patterns_in_typescript/tree/master/decorator)\n* [Facade](https://github.com/torokmark/design_patterns_in_typescript/tree/master/facade)\n* [Flyweight](https://github.com/torokmark/design_patterns_in_typescript/tree/master/flyweight)\n* [Proxy](https://github.com/torokmark/design_patterns_in_typescript/tree/master/proxy)\n\n\n### Behavioral Patterns ###\n\n* [Chain of Responsibility](https://github.com/torokmark/design_patterns_in_typescript/tree/master/chain_of_responsibility)\n* [Command](https://github.com/torokmark/design_patterns_in_typescript/tree/master/command)\n* [Interpreter](https://github.com/torokmark/design_patterns_in_typescript/tree/master/interpreter)\n* [Iterator](https://github.com/torokmark/design_patterns_in_typescript/tree/master/iterator)\n* [Mediator](https://github.com/torokmark/design_patterns_in_typescript/tree/master/mediator)\n* [Memento](https://github.com/torokmark/design_patterns_in_typescript/tree/master/memento)\n* [Observer](https://github.com/torokmark/design_patterns_in_typescript/tree/master/observer)\n* [State](https://github.com/torokmark/design_patterns_in_typescript/tree/master/state)\n* [Strategy](https://github.com/torokmark/design_patterns_in_typescript/tree/master/strategy)\n* [Template Method](https://github.com/torokmark/design_patterns_in_typescript/tree/master/template_method)\n* [Visitor](https://github.com/torokmark/design_patterns_in_typescript/tree/master/visitor)\n\n## Compile the project\n\n```\n$ git clone https://github.com/torokmark/design_patterns_in_typescript.git\n$ cd design_patterns_in_typescript\n$ tsc\n```\n\nThere is a `tsconfig.json` file in the root directory which is responsible for the compiler options.\n\nAs it is set the default target is Ecmascript5 now.\n\nAny additional options come here.\n\nBy default the output is a `patterns.js` file.\n\n\nTo compile only one pattern, use the following command.\n\n```\n$ cd design_patterns_in_typescript/visitor\n$ tsc --target ES5 --module system --outFile visitor.js visitor.ts\n```\n\n## Execute the project\n\nAfter the compilation of the project, a `patterns.js` is generated by default.\nExecuting the file is:\n\n```\nnode patterns.js\n```\n","funding_links":[],"categories":["TypeScript","typescript","Programming Language Design Patterns","Built with TypeScript","TypeScript 设计模式","Language/Framework design patterns (mainly GoF)","GoF design patterns (Language/Framework specifc)","\u003ca name=\"TypeScript\"\u003e\u003c/a\u003eTypeScript","二、按编程语言分的核心设计模式","Learning Resources"],"sub_categories":["Design patterns","英文资源","**JavaScript/TypeScript**","General"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftorokmark%2Fdesign_patterns_in_typescript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftorokmark%2Fdesign_patterns_in_typescript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftorokmark%2Fdesign_patterns_in_typescript/lists"}