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.
Expected Behavior
TS keeps giving error, although it works.
Steps to Reproduce
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.