get types and generics working for PouchDB