mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-03 06:51:53 +01:00
💄
This commit is contained in:
@@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user