This is an automated email from the ASF dual-hosted git repository.
glynnbird pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb-nano.git
The following commit(s) were added to refs/heads/master by this push:
new 8012107 Some typescript fixes (#108)
8012107 is described below
commit 8012107cb0f211731bcc0f450ef45c99ae65992a
Author: jlami <[email protected]>
AuthorDate: Tue Aug 14 15:38:42 2018 +0200
Some typescript fixes (#108)
---
lib/nano.d.ts | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/lib/nano.d.ts b/lib/nano.d.ts
index 8d48b5a..e00befd 100644
--- a/lib/nano.d.ts
+++ b/lib/nano.d.ts
@@ -134,11 +134,11 @@ declare namespace nano {
callback?: Callback<DocumentInsertResponse>
): Promise<DocumentInsertResponse>;
// http://docs.couchdb.org/en/latest/api/document/common.html#get--db-docid
- get(docname: string, callback?: Callback<DocumentGetResponse & D>):
Promise<DocumentGetResponse>;
+ get(docname: string, callback?: Callback<DocumentGetResponse & D>):
Promise<DocumentGetResponse & D>;
// http://docs.couchdb.org/en/latest/api/document/common.html#get--db-docid
- get(docname: string, params?: DocumentGetParams, callback?:
Callback<DocumentGetResponse & D>): Promise<DocumentGetResponse>;
+ get(docname: string, params?: DocumentGetParams, callback?:
Callback<DocumentGetResponse & D>): Promise<DocumentGetResponse & D>;
//
http://docs.couchdb.org/en/latest/api/document/common.html#head--db-docid
- head(docname: string, callback?: Callback<object>): Promise<object>;
+ head(docname: string, callback?: Callback<any>): Promise<any>;
//
http://docs.couchdb.org/en/latest/api/document/common.html#copy--db-docid
copy(src_document: string, dst_document: string, callback?:
Callback<DocumentCopyResponse>): Promise<DocumentCopyResponse>;
//
http://docs.couchdb.org/en/latest/api/document/common.html#copy--db-docid
@@ -251,22 +251,22 @@ declare namespace nano {
view<V>(
designname: string,
viewname: string,
- callback?: Callback<DocumentViewResponse<V>>
- ): Promise<DocumentViewResponse<V>>;
+ callback?: Callback<DocumentViewResponse<V,D>>
+ ): Promise<DocumentViewResponse<V,D>>;
//
http://docs.couchdb.org/en/latest/api/ddoc/views.html#get--db-_design-ddoc-_view-view
//
http://docs.couchdb.org/en/latest/api/ddoc/views.html#post--db-_design-ddoc-_view-view
view<V>(
designname: string,
viewname: string,
params: DocumentViewParams,
- callback?: Callback<DocumentViewResponse<V>>
- ): Promise<DocumentViewResponse<V>>;
+ callback?: Callback<DocumentViewResponse<V,D>>
+ ): Promise<DocumentViewResponse<V,D>>;
//
http://docs.couchdb.org/en/latest/api/ddoc/views.html#get--db-_design-ddoc-_view-view
//
http://docs.couchdb.org/en/latest/api/ddoc/views.html#post--db-_design-ddoc-_view-view
viewAsStream<V>(
designname: string,
viewname: string,
- callback?: Callback<DocumentViewResponse<V>>
+ callback?: Callback<DocumentViewResponse<V,D>>
): Request;
//
http://docs.couchdb.org/en/latest/api/ddoc/views.html#get--db-_design-ddoc-_view-view
//
http://docs.couchdb.org/en/latest/api/ddoc/views.html#post--db-_design-ddoc-_view-view
@@ -274,7 +274,7 @@ declare namespace nano {
designname: string,
viewname: string,
params: DocumentViewParams,
- callback?: Callback<DocumentViewResponse<V>>
+ callback?: Callback<DocumentViewResponse<V,D>>
): Request;
//
http://docs.couchdb.org/en/latest/api/ddoc/render.html#db-design-design-doc-list-list-name-view-name
viewWithList(
@@ -1169,7 +1169,7 @@ declare namespace nano {
}
//
http://docs.couchdb.org/en/latest/api/ddoc/views.html#get--db-_design-ddoc-_view-view
- interface DocumentViewResponse<V> {
+ interface DocumentViewResponse<V,D> {
// Offset where the document list started.
offset: number;
@@ -1178,6 +1178,7 @@ declare namespace nano {
id: string;
key: string;
value: V;
+ doc?: D;
}>;
// Number of documents in the database/view.