I have a Promise chain like this
firstly {
Network.shared.getInfo()
}
.then { info in
Network.shared.getUserDetail(info)
}
.then { detail in
Network.shared.getAddOn(detail)
}
.done { addOn in
//do stuff with addOn
}
.catch { error in
}
and I need to have all values (info, detail and addOn) in the .done
Promise block. Is there a way to extend visibility or pass values throught Promise ?
I can't use when(fulfilled: [])
because each value depends from the previous one.
Thanks.