Kaspanoombro opened a new issue, #308:
URL: https://github.com/apache/couchdb-nano/issues/308
## Expected Behavior
TS keeps giving error, although it works.
## Steps to Reproduce
1. nano.db
.use('mydatabase')
.get("docidxxxxx") //return a type DocumentGetResponse
.then(result=>{
console.log(result); //correctly prints the document (not a
DocumentGetResponse)
const prop1=result.prop1; //Ts gives the error Property 'prop1'
does not exist on type 'DocumentGetResponse'.ts(2339)
const { prop1, _id } = result; //gives the same error
}
this .get() does not have .pipe() which i could use to deconstruct the
object with the map.
How can i access correctly to the document properties using TS?
Thank you.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]