I'm new to Promises and would like to understand what is the correct way to avoid the 'callback hell' with promises, since I'm having the same exact problem as using callbacks
foo(a: number): Promise<boolean>{
return doSomething(a).then((b)=>{
return doAnotherThing(b).then((c)=>{
return true;
})
})
}
Just look at this pyramid..
How can you avoid this?
Thanks in advance