提交 9ab41a44 编写于 作者: J Johannes Rieken

💄

上级 284c2c04
......@@ -57,10 +57,10 @@ export function createCancelablePromise<T>(callback: (token: CancellationToken)
cancel() {
source.cancel();
}
then(resolve, reject) {
then<TResult1 = T, TResult2 = never>(resolve?: ((value: T) => TResult1 | Thenable<TResult1>) | undefined | null, reject?: ((reason: any) => TResult2 | Thenable<TResult2>) | undefined | null): Promise<TResult1 | TResult2> {
return promise.then(resolve, reject);
}
catch(reject) {
catch<TResult = never>(reject?: ((reason: any) => TResult | Thenable<TResult>) | undefined | null): Promise<T | TResult> {
return this.then(undefined, reject);
}
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册