I am dealing with some codebase and there was a discussion between me and a colleague whether to put async
before the function name in this case. I'd say yes, because we have a Promise inside, but might be wrong here. Any advice?
return {
**async ???** loadSmthForFilter: function (diseases) {
return new Promise((resolve, reject) => {
$.get('/api/bla', { diseases })
.done(resolve)
.fail(reject);
});
}