DefinitelyTyped/pouchdb-node/pouchdb-node-tests.ts
geppy a396c170ba Pouchdb (#10171)
* Started definitions for multi-module PouchDB

* Fixed whitespace

* Updated PouchDB definitions for v5.4.4.
2016-07-23 23:45:00 -07:00

20 lines
564 B
TypeScript

/// <reference path="../pouchdb-core/pouchdb-core.d.ts" />
/// <reference path="./pouchdb-node.d.ts" />
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) => {
});
}
}