Is there a way to cast Job to Promise, since some ...
# javascript
g
Is there a way to cast Job to Promise, since some JS functions require returning/passing a Promise?
r
Job
does not have a result. Use
Deferred
instead. And
Deferred
can be converted to
Promise
with
asPromise()
function.
👍 3
If you really want/have to use
Job
you can probably do
async { job.join() }.asPromise()
to get
Promise<Unit>
g
Thanks a lot!