不要怂,就是干,撸起袖子干!

Commit 81750a85 by Mick Hansen

Update event emitter deprecation notice

1 parent f5f58ec7
Showing with 3 additions and 3 deletions
......@@ -177,7 +177,7 @@ Promise.prototype.emit = function(evt) {
*/
Promise.prototype.success =
Promise.prototype.ok = function(fct) {
deprecated('EventEmitter#success|ok is deprecated, please use promise-style instead.');
deprecated('success|ok() is deprecated and will be removed in 2.1, please use promise-style instead.');
if (fct.length > 1) {
return this.spread(fct);
} else {
......@@ -205,7 +205,7 @@ Promise.prototype.ok = function(fct) {
Promise.prototype.error =
Promise.prototype.failure =
Promise.prototype.fail = function(fct) {
deprecated('EventEmitter#failure|fail|error is deprecated, please use promise-style instead.');
deprecated('failure|fail|error() is deprecated and will be removed in 2.1, please use promise-style instead.');
return this.then(null, fct);
};
......@@ -234,7 +234,7 @@ Promise.prototype.complete = function(fct) {
}
if (fct.length > 2) {
deprecated('EventEmitter#complete|done is deprecated, please use promise-style instead.');
deprecated('complete|done() is deprecatedand will be removed in 2.1, please use promise-style instead.');
return this.spread(function() {
fct.apply(null, [null].concat(Array.prototype.slice.call(arguments)));
}, fct);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!