├── .gitignore ├── README.md ├── jest.config.js ├── package.json ├── src ├── abstract-factory │ ├── Armor.ts │ ├── Factories.ts │ ├── Weapon.ts │ └── index.ts ├── builder │ ├── FileProcessor.ts │ ├── FileProcessorBuilder.ts │ ├── __tests__ │ │ ├── FileProcessor.test.ts │ │ ├── FileReaderBuilder.test.ts │ │ ├── test-empty-file.txt │ │ └── test-file.txt │ ├── crypto.txt │ └── index.ts ├── chain-of-responsibility │ ├── ATM.test.ts │ ├── ATM.ts │ ├── AmountHandler.ts │ ├── DollarBill.ts │ └── index.ts ├── command │ ├── Remote.test.ts │ ├── Remote.ts │ ├── Television.ts │ └── index.ts ├── factory │ ├── Archer.ts │ ├── Battle.ts │ ├── Knight.ts │ ├── Warrior.ts │ ├── WarriorFactory.ts │ ├── Weapon.ts │ └── index.ts ├── fp │ ├── reduceFilter.ts │ ├── reduceMap.ts │ └── transducers.ts ├── generator │ ├── CityProcessor.ts │ ├── LineProcessor.ts │ ├── LineReader.ts │ ├── WeaponProcessor.ts │ ├── cities.txt │ ├── index.ts │ └── weapons.txt ├── iterator │ ├── Iterator.test.ts │ ├── Iterator.ts │ ├── Weapon.ts │ └── index.ts ├── observer │ ├── AuctionManager.ts │ ├── Bidder.ts │ └── index.ts ├── prototype │ ├── Sniper.ts │ ├── Soldier.ts │ └── index.ts ├── strategy │ ├── Authenticator.test.ts │ ├── Authenticator.ts │ ├── Providers.ts │ └── index.ts └── this-keyword │ ├── Warrior.test.ts │ ├── Warrior.ts │ ├── WarriorFactory.ts │ ├── Weapon.test.ts │ ├── Weapon.ts │ ├── WeaponFactory.ts │ └── index.ts ├── tsconfig.json └── yarn.lock /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | build -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mateogalic112/typescript-design-patterns/HEAD/README.md -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mateogalic112/typescript-design-patterns/HEAD/jest.config.js -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mateogalic112/typescript-design-patterns/HEAD/package.json -------------------------------------------------------------------------------- /src/abstract-factory/Armor.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mateogalic112/typescript-design-patterns/HEAD/src/abstract-factory/Armor.ts -------------------------------------------------------------------------------- /src/abstract-factory/Factories.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mateogalic112/typescript-design-patterns/HEAD/src/abstract-factory/Factories.ts -------------------------------------------------------------------------------- /src/abstract-factory/Weapon.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mateogalic112/typescript-design-patterns/HEAD/src/abstract-factory/Weapon.ts -------------------------------------------------------------------------------- /src/abstract-factory/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mateogalic112/typescript-design-patterns/HEAD/src/abstract-factory/index.ts -------------------------------------------------------------------------------- /src/builder/FileProcessor.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mateogalic112/typescript-design-patterns/HEAD/src/builder/FileProcessor.ts -------------------------------------------------------------------------------- /src/builder/FileProcessorBuilder.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mateogalic112/typescript-design-patterns/HEAD/src/builder/FileProcessorBuilder.ts -------------------------------------------------------------------------------- /src/builder/__tests__/FileProcessor.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mateogalic112/typescript-design-patterns/HEAD/src/builder/__tests__/FileProcessor.test.ts -------------------------------------------------------------------------------- /src/builder/__tests__/FileReaderBuilder.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mateogalic112/typescript-design-patterns/HEAD/src/builder/__tests__/FileReaderBuilder.test.ts -------------------------------------------------------------------------------- /src/builder/__tests__/test-empty-file.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/builder/__tests__/test-file.txt: -------------------------------------------------------------------------------- 1 | I am just a dummy file! -------------------------------------------------------------------------------- /src/builder/crypto.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mateogalic112/typescript-design-patterns/HEAD/src/builder/crypto.txt -------------------------------------------------------------------------------- /src/builder/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mateogalic112/typescript-design-patterns/HEAD/src/builder/index.ts -------------------------------------------------------------------------------- /src/chain-of-responsibility/ATM.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mateogalic112/typescript-design-patterns/HEAD/src/chain-of-responsibility/ATM.test.ts -------------------------------------------------------------------------------- /src/chain-of-responsibility/ATM.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mateogalic112/typescript-design-patterns/HEAD/src/chain-of-responsibility/ATM.ts -------------------------------------------------------------------------------- /src/chain-of-responsibility/AmountHandler.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mateogalic112/typescript-design-patterns/HEAD/src/chain-of-responsibility/AmountHandler.ts -------------------------------------------------------------------------------- /src/chain-of-responsibility/DollarBill.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mateogalic112/typescript-design-patterns/HEAD/src/chain-of-responsibility/DollarBill.ts -------------------------------------------------------------------------------- /src/chain-of-responsibility/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mateogalic112/typescript-design-patterns/HEAD/src/chain-of-responsibility/index.ts -------------------------------------------------------------------------------- /src/command/Remote.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mateogalic112/typescript-design-patterns/HEAD/src/command/Remote.test.ts -------------------------------------------------------------------------------- /src/command/Remote.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mateogalic112/typescript-design-patterns/HEAD/src/command/Remote.ts -------------------------------------------------------------------------------- /src/command/Television.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mateogalic112/typescript-design-patterns/HEAD/src/command/Television.ts -------------------------------------------------------------------------------- /src/command/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mateogalic112/typescript-design-patterns/HEAD/src/command/index.ts -------------------------------------------------------------------------------- /src/factory/Archer.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mateogalic112/typescript-design-patterns/HEAD/src/factory/Archer.ts -------------------------------------------------------------------------------- /src/factory/Battle.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mateogalic112/typescript-design-patterns/HEAD/src/factory/Battle.ts -------------------------------------------------------------------------------- /src/factory/Knight.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mateogalic112/typescript-design-patterns/HEAD/src/factory/Knight.ts -------------------------------------------------------------------------------- /src/factory/Warrior.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mateogalic112/typescript-design-patterns/HEAD/src/factory/Warrior.ts -------------------------------------------------------------------------------- /src/factory/WarriorFactory.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mateogalic112/typescript-design-patterns/HEAD/src/factory/WarriorFactory.ts -------------------------------------------------------------------------------- /src/factory/Weapon.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mateogalic112/typescript-design-patterns/HEAD/src/factory/Weapon.ts -------------------------------------------------------------------------------- /src/factory/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mateogalic112/typescript-design-patterns/HEAD/src/factory/index.ts -------------------------------------------------------------------------------- /src/fp/reduceFilter.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mateogalic112/typescript-design-patterns/HEAD/src/fp/reduceFilter.ts -------------------------------------------------------------------------------- /src/fp/reduceMap.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mateogalic112/typescript-design-patterns/HEAD/src/fp/reduceMap.ts -------------------------------------------------------------------------------- /src/fp/transducers.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mateogalic112/typescript-design-patterns/HEAD/src/fp/transducers.ts -------------------------------------------------------------------------------- /src/generator/CityProcessor.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mateogalic112/typescript-design-patterns/HEAD/src/generator/CityProcessor.ts -------------------------------------------------------------------------------- /src/generator/LineProcessor.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mateogalic112/typescript-design-patterns/HEAD/src/generator/LineProcessor.ts -------------------------------------------------------------------------------- /src/generator/LineReader.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mateogalic112/typescript-design-patterns/HEAD/src/generator/LineReader.ts -------------------------------------------------------------------------------- /src/generator/WeaponProcessor.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mateogalic112/typescript-design-patterns/HEAD/src/generator/WeaponProcessor.ts -------------------------------------------------------------------------------- /src/generator/cities.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mateogalic112/typescript-design-patterns/HEAD/src/generator/cities.txt -------------------------------------------------------------------------------- /src/generator/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mateogalic112/typescript-design-patterns/HEAD/src/generator/index.ts -------------------------------------------------------------------------------- /src/generator/weapons.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mateogalic112/typescript-design-patterns/HEAD/src/generator/weapons.txt -------------------------------------------------------------------------------- /src/iterator/Iterator.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mateogalic112/typescript-design-patterns/HEAD/src/iterator/Iterator.test.ts -------------------------------------------------------------------------------- /src/iterator/Iterator.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mateogalic112/typescript-design-patterns/HEAD/src/iterator/Iterator.ts -------------------------------------------------------------------------------- /src/iterator/Weapon.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mateogalic112/typescript-design-patterns/HEAD/src/iterator/Weapon.ts -------------------------------------------------------------------------------- /src/iterator/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mateogalic112/typescript-design-patterns/HEAD/src/iterator/index.ts -------------------------------------------------------------------------------- /src/observer/AuctionManager.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mateogalic112/typescript-design-patterns/HEAD/src/observer/AuctionManager.ts -------------------------------------------------------------------------------- /src/observer/Bidder.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mateogalic112/typescript-design-patterns/HEAD/src/observer/Bidder.ts -------------------------------------------------------------------------------- /src/observer/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mateogalic112/typescript-design-patterns/HEAD/src/observer/index.ts -------------------------------------------------------------------------------- /src/prototype/Sniper.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mateogalic112/typescript-design-patterns/HEAD/src/prototype/Sniper.ts -------------------------------------------------------------------------------- /src/prototype/Soldier.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mateogalic112/typescript-design-patterns/HEAD/src/prototype/Soldier.ts -------------------------------------------------------------------------------- /src/prototype/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mateogalic112/typescript-design-patterns/HEAD/src/prototype/index.ts -------------------------------------------------------------------------------- /src/strategy/Authenticator.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mateogalic112/typescript-design-patterns/HEAD/src/strategy/Authenticator.test.ts -------------------------------------------------------------------------------- /src/strategy/Authenticator.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mateogalic112/typescript-design-patterns/HEAD/src/strategy/Authenticator.ts -------------------------------------------------------------------------------- /src/strategy/Providers.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mateogalic112/typescript-design-patterns/HEAD/src/strategy/Providers.ts -------------------------------------------------------------------------------- /src/strategy/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mateogalic112/typescript-design-patterns/HEAD/src/strategy/index.ts -------------------------------------------------------------------------------- /src/this-keyword/Warrior.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mateogalic112/typescript-design-patterns/HEAD/src/this-keyword/Warrior.test.ts -------------------------------------------------------------------------------- /src/this-keyword/Warrior.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mateogalic112/typescript-design-patterns/HEAD/src/this-keyword/Warrior.ts -------------------------------------------------------------------------------- /src/this-keyword/WarriorFactory.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mateogalic112/typescript-design-patterns/HEAD/src/this-keyword/WarriorFactory.ts -------------------------------------------------------------------------------- /src/this-keyword/Weapon.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mateogalic112/typescript-design-patterns/HEAD/src/this-keyword/Weapon.test.ts -------------------------------------------------------------------------------- /src/this-keyword/Weapon.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mateogalic112/typescript-design-patterns/HEAD/src/this-keyword/Weapon.ts -------------------------------------------------------------------------------- /src/this-keyword/WeaponFactory.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mateogalic112/typescript-design-patterns/HEAD/src/this-keyword/WeaponFactory.ts -------------------------------------------------------------------------------- /src/this-keyword/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mateogalic112/typescript-design-patterns/HEAD/src/this-keyword/index.ts -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mateogalic112/typescript-design-patterns/HEAD/tsconfig.json -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mateogalic112/typescript-design-patterns/HEAD/yarn.lock --------------------------------------------------------------------------------