Adapt two types of data storage (in-memory, CouchDB) interfaces to the following one.
interface DataAdapter {
getData: (id: string | number, callback: (error: any, data: any) => void) => void
storeData: (id: string | number, data: any, callback: (error: any) => void) => void
}