Add reason to cancel method.

This commit is contained in:
edvin
2015-11-20 14:32:45 +01:00
parent 16134c168d
commit e5f2a84d7d
+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.