Advanced TypeScript Programming Projects
上QQ阅读APP看书,第一时间看更新

Updating markdown document using visitors

In Chapter 1Advanced TypeScript Features, we briefly touched on patterns. Simply put, patterns in the software development process are general solutions to particular problems. This simply means that we use the name of a pattern to convey to others that we are solving a problem using particular and well-established code examples. For instance, if we say to another developer that we are solving a problem using a mediator pattern, as long as the other developer is aware of patterns, they will have a pretty good idea as to how we will be structuring our code.

When I was planning this code out, I made a conscious decision early on that we would be using something called the visitor pattern with our code. Before we look at the code we are going to create, we will have a look at what this pattern is and why we are going to use it.