mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-28 12:43:06 +08:00
Add reason to cancel method.
This commit is contained in:
Vendored
+1
-1
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user