mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* Started definitions for multi-module PouchDB * Fixed whitespace * Updated PouchDB definitions for v5.4.4.
20 lines
564 B
TypeScript
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) => {
|
|
});
|
|
}
|
|
}
|