diff --git a/lib/createDeferredTask.js b/lib/createDeferredTask.js index 0783a085b..b5b2e308a 100644 --- a/lib/createDeferredTask.js +++ b/lib/createDeferredTask.js @@ -1,16 +1,15 @@ /** * Create a deferred task that can be resolved when we call `resolve()` - * The returned promise will complete only when we call `resolve` or `reject` + * The returned promise will complete when we call `resolve` * Useful when we want to wait for a tasks that is resolved from an external action * * @template T - * @returns {{ resolve: function(*), reject: function(Error), promise: Promise }} + * @returns {{ resolve: function(*), promise: Promise }} */ export default function createDeferredTask() { const deferred = {}; - deferred.promise = new Promise((res, rej) => { + deferred.promise = new Promise((res) => { deferred.resolve = res; - deferred.reject = rej; }); return deferred;