Visitor Use Case : Design Patterns in TypeScript

Channel:
Subscribers:
24,900
Published on ● Video Link: https://www.youtube.com/watch?v=a0Rxe-dla_I



Duration: 2:59
0 views
0


https://www.amazon.com/dp/B0948BCH24 : ASIN B0948BCH24
https://www.amazon.com/dp/B094716FD6 : ASIN B094716FD6

Documentation : https://sbcode.net/typescript/visitor/#visitor-use-case

In the example, the client creates a car with parts.

The car and parts inherit an abstract car parts class with predefined property getters and setters.

Instead of creating methods in the car parts classes and abstract class that run bespoke methods, the car parts can all implement the IVisitor interface.

This allows for the later creation of Visitor objects to run specific tasks on the existing hierarchy of objects.

#visitorPattern
#typescriptVisitor
#visitorPatternTypescript







Tags:
Design Patterns In TypeScript
TypeScript
Design Patterns
visitor
visitor pattern