diff --git a/src/browser/tsconfig.json b/src/browser/tsconfig.json index 38854e26..d8f3a189 100644 --- a/src/browser/tsconfig.json +++ b/src/browser/tsconfig.json @@ -7,8 +7,7 @@ ], "outDir": "../../out", "types": [ - "../../node_modules/@types/mocha", - "../vs/typings/thenable.d.ts" + "../../node_modules/@types/mocha" ], "baseUrl": "..", "paths": { diff --git a/src/vs/base/common/async.ts b/src/vs/base/common/async.ts index 20f15f32..c0b2669f 100644 --- a/src/vs/base/common/async.ts +++ b/src/vs/base/common/async.ts @@ -124,7 +124,7 @@ export function raceTimeout(promise: Promise, timeout: number, onTimeout?: ]); } -export function asPromise(callback: () => T | Thenable): Promise { +export function asPromise(callback: () => T | PromiseLike): Promise { return new Promise((resolve, reject) => { const item = callback(); if (isThenable(item)) { diff --git a/src/vs/typings/thenable.d.ts b/src/vs/typings/thenable.d.ts deleted file mode 100644 index 73373ead..00000000 --- a/src/vs/typings/thenable.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -/** - * Thenable is a common denominator between ES6 promises, Q, jquery.Deferred, WinJS.Promise, - * and others. This API makes no assumption about what promise library is being used which - * enables reusing existing code without migrating to a specific promise implementation. Still, - * we recommend the use of native promises which are available in VS Code. - */ -interface Thenable extends PromiseLike { }