Add name member to Database interface.

Looking at the PouchDB source, this member is always set[1] (earlier in that function we throw if the name is not a string).

[1] https://github.com/pouchdb/pouchdb/blob/master/packages/node_modules/pouchdb-core/src/constructor.js#L68
This commit is contained in:
Brian Birtles
2018-02-17 14:04:28 +09:00
parent d86ac40c98
commit 2da5be97e5
+3
View File
@@ -581,6 +581,9 @@ declare namespace PouchDB {
}
interface Database<Content extends {} = {}> {
/** The name passed to the PouchDB constructor and unique identifier of the database. */
name: string;
/** Fetch all documents matching the given options. */
allDocs<Model>(options?: Core.AllDocsWithKeyOptions | Core.AllDocsWithKeysOptions | Core.AllDocsWithinRangeOptions | Core.AllDocsOptions):
Promise<Core.AllDocsResponse<Content & Model>>;