From 2da5be97e5e747f2437d72b63e43083637e615e6 Mon Sep 17 00:00:00 2001 From: Brian Birtles Date: Sat, 17 Feb 2018 13:56:01 +0900 Subject: [PATCH] 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 --- types/pouchdb-core/index.d.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/types/pouchdb-core/index.d.ts b/types/pouchdb-core/index.d.ts index 59e5650e62..af9fed83a2 100644 --- a/types/pouchdb-core/index.d.ts +++ b/types/pouchdb-core/index.d.ts @@ -581,6 +581,9 @@ declare namespace PouchDB { } interface Database { + /** The name passed to the PouchDB constructor and unique identifier of the database. */ + name: string; + /** Fetch all documents matching the given options. */ allDocs(options?: Core.AllDocsWithKeyOptions | Core.AllDocsWithKeysOptions | Core.AllDocsWithinRangeOptions | Core.AllDocsOptions): Promise>;