Merge pull request #6854 from edvinv/bluebird-cancel

Add reason to cancel method.
This commit is contained in:
Masahiro Wakame
2015-11-27 00:26:22 +09:00
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -131,7 +131,7 @@ declare class Promise<R> implements Promise.Thenable<R> {
* Promises are by default not cancellable. Use `.cancellable()` to mark a promise as cancellable.
*/
// TODO what to do with this?
cancel<U>(): Promise<U>;
cancel<U>(reason?: any): Promise<U>;
/**
* Like `.then()`, but cancellation of the the returned promise or any of its descendant will not propagate cancellation to this promise or this promise's ancestors.
+1 -1
View File
@@ -134,7 +134,7 @@ declare class Promise<R> implements Promise.Thenable<R>, Promise.Inspection<R> {
* Promises are by default not cancellable. Use `.cancellable()` to mark a promise as cancellable.
*/
// TODO what to do with this?
cancel<U>(): Promise<U>;
cancel<U>(reason?: any): Promise<U>;
/**
* Like `.then()`, but cancellation of the the returned promise or any of its descendant will not propagate cancellation to this promise or this promise's ancestors.