lib/promise.js
function () {
            var ret = {
                promise: function () {
                    return ret;
                }
            };
            var self = this;
            ret["chain"] = function () {
                return spreadArgs(self["chain"], arguments, self);
            };
            ret["chainBoth"] = function () {
                return spreadArgs(self["chainBoth"], arguments, self);
            };
            ret["addCallback"] = function () {
                spreadArgs(self["addCallback"], arguments, self);
                return ret;
            };
            ret["addErrback"] = function () {
                spreadArgs(self["addErrback"], arguments, self);
                return ret;
            };
            ret["then"] = function () {
                spreadArgs(self["then"], arguments, self);
                return ret;
            };
            ret["both"] = function () {
                spreadArgs(self["both"], arguments, self);
                return ret;
            };
            ret["classic"] = function () {
                spreadArgs(self["classic"], arguments, self);
                return ret;
            };
            return ret;
        }
function () {
            var ret = {
                promise: function () {
                    return ret;
                }
            };
            var self = this;
            ret["chain"] = function () {
                return spreadArgs(self["chain"], arguments, self);
            };
            ret["chainBoth"] = function () {
                return spreadArgs(self["chainBoth"], arguments, self);
            };
            ret["addCallback"] = function () {
                spreadArgs(self["addCallback"], arguments, self);
                return ret;
            };
            ret["addErrback"] = function () {
                spreadArgs(self["addErrback"], arguments, self);
                return ret;
            };
            ret["then"] = function () {
                spreadArgs(self["then"], arguments, self);
                return ret;
            };
            ret["both"] = function () {
                spreadArgs(self["both"], arguments, self);
                return ret;
            };
            ret["classic"] = function () {
                spreadArgs(self["classic"], arguments, self);
                return ret;
            };
            return ret;
        }
function ( ) { var ret = { promise : function ( ) { return ret ; } } ; var self = this ; ret [ "chain" ] = function ( ) { return spreadArgs ( self [ "chain" ] , arguments , self ) ; } ; ret [ "chainBoth" ] = function ( ) { return spreadArgs ( self [ "chainBoth" ] , arguments , self ) ; } ; ret [ "addCallback" ] = function ( ) { spreadArgs ( self [ "addCallback" ] , arguments , self ) ; return ret ; } ; ret [ "addErrback" ] = function ( ) { spreadArgs ( self [ "addErrback" ] , arguments , self ) ; return ret ; } ; ret [ "then" ] = function ( ) { spreadArgs ( self [ "then" ] , arguments , self ) ; return ret ; } ; ret [ "both" ] = function ( ) { spreadArgs ( self [ "both" ] , arguments , self ) ; return ret ; } ; ret [ "classic" ] = function ( ) { spreadArgs ( self [ "classic" ] , arguments , self ) ; return ret ; } ; return ret ; }
Creates an object to that contains methods to listen to resolution but not the "callback" or "errback" methods.

@example

var asyncMethod = function(){
var ret = new comb.Promise();
process.nextTick(ret.callback.bind(ret, "hello"));
return ret.promise();
}

asyncMethod().callback() //throws error

@return {Object} an object containing "chain", "chainBoth", "promise", "addCallback", "addErrback", "then", "both".
Creates an object to that contains methods to listen to resolution but not the callback or errback methods .