lib/altshift/promise.js
function (resolvedCallback, errorCallback, progressCallback) {
        var returnDeferred = new Deferred(this._canceller), //new Deferred(this.getPromise().cancel)
            listener = {
                resolved : resolvedCallback,
                error : errorCallback,
                progress : progressCallback,
                deferred : returnDeferred
            };

        if (this.finished) {
            this._notify(listener);
        } else {
            this.waiting.push(listener);
        }
        return returnDeferred.getPromise();
    }
function (resolvedCallback, errorCallback, progressCallback) {
        var returnDeferred = new Deferred(this._canceller), //new Deferred(this.getPromise().cancel)
            listener = {
                resolved : resolvedCallback,
                error : errorCallback,
                progress : progressCallback,
                deferred : returnDeferred
            };

        if (this.finished) {
            this._notify(listener);
        } else {
            this.waiting.push(listener);
        }
        return returnDeferred.getPromise();
    }
function ( resolvedCallback , errorCallback , progressCallback ) { var returnDeferred = new Deferred ( this . _canceller ) , //new Deferred(this.getPromise().cancel) listener = { resolved : resolvedCallback , error : errorCallback , progress : progressCallback , deferred : returnDeferred } ; if ( this . finished ) { this . _notify ( listener ) ; } else { this . waiting . push ( listener ) ; } return returnDeferred . getPromise ( ) ; }
Return a new promise

@param {Function} resolvedCallback
@param {Function} errorCallback
@param {Function} progressCallback
@return {Promise}
Return a new promise