DefinitelyTyped/pouchdb-node/pouchdb-node-tests.ts

17 lines
459 B
TypeScript

namespace PouchDBBrowserTests {
function testConstructor() {
type MyModel = { numericProperty: number };
let model: PouchDB.Core.Document<MyModel>;
let db = new PouchDB<MyModel>('myDb', {
adapter: 'http',
});
db = new PouchDB<MyModel>('myDb', {
adapter: 'leveldb',
});
db.get('model').then((result) => model);
db.viewCleanup().catch((error) => {
});
}
}