@@ -189,13 +189,13 @@ declare namespace nano {
189
189
callback ?: Callback < DocumentFetchResponse < D > >
190
190
) : Promise < DocumentFetchResponse < D > > ;
191
191
// http://docs.couchdb.org/en/latest/api/database/bulk-api.html#post--db-_all_docs
192
- fetchRevs ( docnames : BulkFetchDocsWrapper , callback ?: Callback < DocumentFetchRevsResponse > ) : Promise < DocumentFetchRevsResponse > ;
192
+ fetchRevs ( docnames : BulkFetchDocsWrapper , callback ?: Callback < DocumentFetchRevsResponse < D > > ) : Promise < DocumentFetchRevsResponse < D > > ;
193
193
// http://docs.couchdb.org/en/latest/api/database/bulk-api.html#post--db-_all_docs
194
194
fetchRevs (
195
195
docnames : BulkFetchDocsWrapper ,
196
196
params : DocumentFetchParams ,
197
- callback ?: Callback < DocumentFetchRevsResponse >
198
- ) : Promise < DocumentFetchRevsResponse > ;
197
+ callback ?: Callback < DocumentFetchRevsResponse < D > >
198
+ ) : Promise < DocumentFetchRevsResponse < D > > ;
199
199
// http://docs.couchdb.org/en/latest/api/database/find.html#db-index
200
200
createIndex ( indexDef : CreateIndexRequest ,
201
201
callback ?: Callback < CreateIndexResponse >
@@ -1040,22 +1040,25 @@ declare namespace nano {
1040
1040
start_key_doc_id ?: string ;
1041
1041
update_seq ?: boolean ;
1042
1042
}
1043
+ interface DocumentLookupFailure {
1044
+ key : string ;
1045
+ error : string ;
1046
+ }
1043
1047
1044
1048
interface DocumentFetchResponse < D > {
1045
1049
offset : number ;
1046
- rows : Array < DocumentResponseRow < D > > ;
1050
+ rows : Array < DocumentResponseRow < D > | DocumentLookupFailure > ;
1047
1051
total_rows : number ;
1048
1052
update_seq ?: number ;
1049
1053
}
1050
1054
1051
- interface DocumentFetchRevsResponse {
1055
+ interface DocumentFetchRevsResponse < D > {
1052
1056
offset : number ;
1053
- rows : DocumentResponseRowMeta [ ] ;
1057
+ rows : Array < DocumentResponseRow < D > | DocumentLookupFailure > ;
1054
1058
total_rows : number ;
1055
1059
update_seq ?: number ;
1056
1060
}
1057
1061
1058
-
1059
1062
interface DocumentSearchResponse < V > {
1060
1063
1061
1064
// Array of search results
0 commit comments