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/04/17 21:28:23 UTC

[GitHub] [couchdb-nano] mlecoq opened a new issue #152: Typescript, view and doc type

mlecoq opened a new issue #152: Typescript, view and doc type
URL: https://github.com/apache/couchdb-nano/issues/152
 
 
   Hi,
   
   According Typescript definition, when i set *include_docs* to *true*, returned docs have D types :
   
          
       interface DocumentViewResponse<V,D> {
       // Offset where the document list started.
       offset: number;
   
       //  Array of view row objects. By default the information returned contains only the document ID and revision.
       rows: Array<{
         id: string;
         key: string;
         value: V;
         doc?: D;
       }>;
   
       ....
   
   
   It is annoying because I expect to have a real Document (with *_id* and *_rev*) and D only contains specific fields.
   
   Could we change the doc definition with:
   
       doc?: D & Document
    
   ?
   
   I will make a pull request for that
   

----------------------------------------------------------------
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