There are a series of tasks that I need to accomplish using an API. It's crucial that these functions are executed sequentially. Each of the functions mentioned below returns a valid promise.
a(analyticsConfig._listConfig)
.then(function() {
return b(listName, analyticsConfig._fieldConfig);
})
.then(function() {
return c(listName)
})
.then(function() {
return d(analyticsConfig._roleConfig);
})
I wish there was a way to use something like
a.then(b(listName, analyticsConfig._fieldConfig))
, but as you might already realize, this approach won't work.
Can anyone suggest an alternative method to achieve this?