mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-06 12:36:49 +08:00
16 lines
360 B
TypeScript
16 lines
360 B
TypeScript
interface MyModel {
|
|
numericProperty: number;
|
|
}
|
|
|
|
function testConstructor(model: PouchDB.Core.Document<MyModel>) {
|
|
let db = new PouchDB<MyModel>(null, {
|
|
adapter: 'idb',
|
|
});
|
|
db = new PouchDB<MyModel>('myDb', {
|
|
adapter: 'http',
|
|
});
|
|
db.get('model').then((result) => model);
|
|
db.viewCleanup().catch((error) => {
|
|
});
|
|
}
|