Sunday, December 25, 2016

Strategy and Factory patterns in Typescript

I've recently read the dzone article Design Patterns: The Strategy and Factory Patterns which gives clean example of how design patterns such as Strategy and Factory patterns can improve code structure in every day programming tasks.
I've converted the JAVA syntax used in the article to Typescript, to see how close are the language constructs in those two. Here's the gist with the code: