Adapter
TypeScriptApplicationAdapter in TypeScript
A TypeScript implementation of the Adapter pattern.
TypeScript
export interface TaskProvider {
getTask(id: string): Promise<Task>;
}Normalize a third-party task payload into the application’s internal task model.
The application must use task data from an external API whose payload shape differs from the internal task model.
Adapter
TypeScriptApplicationA TypeScript implementation of the Adapter pattern.
export interface TaskProvider {
getTask(id: string): Promise<Task>;
}