Skip to content

Instantly share code, notes, and snippets.

@joelpalmer
joelpalmer / adapter.ts
Created February 28, 2017 15:39
Adapter Pattern with TypeScript
//target (our payment object interface)
interface IPayment {
id: string;
total: number;
SubmitPayment: Function;
}
//our payment class
class Payment implements IPayment {
public id: string;
public total: number;