Hi i have the following method that i am trying to use
sendrequest(req: connreq) {
var promise = new Promise((resolve, reject) => {
this.firereq.child(req.recipient).push({
sender: req.sender
}).then(() => {
resolve({ success: true });
}).catch((error) => {
resolve(error);
})
})
return promise;
}
But my visual studio code gives me the following error
Property 'catch' does not exist on type 'PromiseLike<void>'
I am using ionic to compile this program and i am unsure on how to correct this method. My tutorial is in ionic 3 so it may be old and i am not sure how to alter it to fit in to the new version.