Design patterns - Typescript

Adapter

It’s very often used in systems based on some legacy code.
In such cases, Adapters make legacy code with modern classes.

Adapter is commonly used with an existing app to make some otherwise-incompatible classes work together nicely.

adapter can be used when methods names do not correspond
or when methods return is not the same

Loading...