You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2019/12/03 16:55:10 UTC
[GitHub] [couchdb-nano] kylechine opened a new pull request #187: Bugfix
(nano.d.ts): DocumentScope.atomic method returns a customizable data
structure
kylechine opened a new pull request #187: Bugfix (nano.d.ts): DocumentScope.atomic method returns a customizable data structure
URL: https://github.com/apache/couchdb-nano/pull/187
## Overview
The return value of `DocumentScope.atomic` method is wrong.
## Details
According to the CouchDB documentation:
<http://docs.couchdb.org/en/latest/api/ddoc/render.html#put--db-_design-ddoc-_update-func-docid>
The update function response is customizable and should be given by user. But in current version of type definition, the return value is `Promise<OkResponse>`
```
interface OkResponse {
// Operation status
ok: boolean;
}
```
Which is incorrect.
## Solution
I changed the method definition to `atomic<R>`, in which <R> means customized Response data structure.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services