DEV Community

Discussion on: Design Patterns Everyday

Collapse
 
jmojico profile image
Julian Mojico

Hi again Anurag!
I'm still reading your article, day by day :)

Regarding the adapter pattern:
In this line: Does the method LoggerAdapter.log() needs type argument ?
Would it be better if it takes it from this.type ?

Thank you!

Thread Thread
 
anuraghazra profile image
Anurag Hazra

Actually i have seen some example where the type argument isn't required. And some of them used the type argument it depends on the context I think.

I think I have to update that example with better one.

Here's another example if you wanna look:github.com/anuraghazra/design-patt...

// more info
refactoring.guru/design-patterns/a...