Strategy Pattern in TypeScript
The Strategy Pattern is similar to the State Pattern, except that the client passes in the algorithm that the context should run.
The algorithm should be contained within a class that implements the particular strategies interface.
An application that sorts data is a good example of where you can incorporate the Strategy pattern.
There are many methods of sorting a set of data. E.g., Quicksort, Mergesort, Introsort, Heapsort, Bubblesort. See https://en.wikipedia.org/wiki/Sorting_algorithm for more examples.