eng - less TPromise usage

This commit is contained in:
Johannes Rieken
2018-10-16 17:16:12 +02:00
parent f9d93e884d
commit ebeff1000b
4 changed files with 22 additions and 29 deletions

View File

@@ -5,7 +5,6 @@
import { URI, UriComponents } from 'vs/base/common/uri';
import * as nls from 'vs/nls';
import { TPromise } from 'vs/base/common/winjs.base';
import * as Objects from 'vs/base/common/objects';
import { asThenable } from 'vs/base/common/async';
import { Event, Emitter } from 'vs/base/common/event';
@@ -863,7 +862,7 @@ export class ExtHostTask implements ExtHostTaskShape {
public $provideTasks(handle: number, validTypes: { [key: string]: boolean; }): Thenable<tasks.TaskSet> {
let handler = this._handlers.get(handle);
if (!handler) {
return TPromise.wrapError<tasks.TaskSet>(new Error('no handler found'));
return Promise.reject(new Error('no handler found'));
}
return asThenable(() => handler.provider.provideTasks(CancellationToken.None)).then(value => {
let sanitized: vscode.Task[] = [];