I have to use a method that returns a promise and that is inside a function. I want to return a value for the parent function in the .then()
of the promise.
returnSomething():boolean{
theFunctionThatReturnsAPromise()
.then(
//return true for the returnSomething function here
).catch(
//return false for the returnSomething function here
);
}
How can I do this with typescript/Javascript?