Adapter
TypeScriptApplicationAdapter in TypeScript
A TypeScript implementation of the Adapter pattern.
TypeScript
export interface TaskProvider {
getTask(id: string): Promise<Task>;
}Translate a legacy payment gateway API into the checkout service interface used by the application.
The checkout service expects an application-owned payment interface, but the legacy payment gateway exposes an incompatible API contract.
Adapter
TypeScriptApplicationA TypeScript implementation of the Adapter pattern.
export interface TaskProvider {
getTask(id: string): Promise<Task>;
}