will
Version:
Flexible futures
35 lines (24 loc) • 959 B
JavaScript
// Generated by CoffeeScript 1.6.3
(function() {
var Deferral, Rejection, isArray, slice, state,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
state = require('state');
Deferral = require('./deferral');
slice = Array.prototype.slice;
isArray = require('util').isArray;
module.exports = Rejection = (function(_super) {
__extends(Rejection, _super);
function Rejection(values) {
this._values = isArray(values) ? slice.call(values) : [values];
}
state(Rejection.prototype, {
resolved: {
completed: {
rejected: state('initial final')
}
}
});
return Rejection;
})(Deferral);
}).call(this);