Chain of Responsibility Use Case : Design Patterns in TypeScript
Channel:
Subscribers:
24,900
Published on ● Video Link: https://www.youtube.com/watch?v=AtHTgX6o2z8
https://www.amazon.com/dp/B0948BCH24 : ASIN B0948BCH24
https://www.amazon.com/dp/B094716FD6 : ASIN B094716FD6
Documentation : https://sbcode.net/typescript/chain_of_responsibility/#chain-of-responsibility-use-case
In the ATM example below, the chain is hard coded in the client first to dispense amounts of £50s, then £20s and then £10s in order.
This default chain order helps to ensure that the minimum number of notes will be dispensed. Otherwise, it might dispense 5 x £10 when it would have been better to dispense 1 x £50.
#chainOfResponsibilityPattern
#typescriptChainOfResponsibility
#chainOfResponsibilityPatternTypescript
Other Videos By SBCODE
Tags:
Design Patterns In TypeScript
TypeScript
Design Patterns
Chain of Responsibility
Chain of Responsibility pattern