Looking at your code, it's not clear that this is the adapter pattern in play. Your adaptor class should either extend the adaptee class or for typed implement the same interface as the adapted class.
The way it is written can only work for non-typed languages and does not communicate the pattern correctly to a person reading the code.
Thank you for the feedback! I have implemented an interface using typescript. I would rather not implement same interface for both ( adpater and adapte classes) to prevent a tight coupling of both classes
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Good start but....
Looking at your code, it's not clear that this is the adapter pattern in play. Your adaptor class should either extend the adaptee class or for typed implement the same interface as the adapted class.
The way it is written can only work for non-typed languages and does not communicate the pattern correctly to a person reading the code.
Thank you for the feedback! I have implemented an interface using typescript. I would rather not implement same interface for both ( adpater and adapte classes) to prevent a tight coupling of both classes