diff --git a/src/vs/base/common/event.ts b/src/vs/base/common/event.ts index 203bcb896f9..957011262c0 100644 --- a/src/vs/base/common/event.ts +++ b/src/vs/base/common/event.ts @@ -8,6 +8,7 @@ import { onUnexpectedError } from 'vs/base/common/errors'; import { once as onceFn } from 'vs/base/common/functional'; import { combinedDisposable, Disposable, IDisposable, toDisposable } from 'vs/base/common/lifecycle'; import { LinkedList } from 'vs/base/common/linkedList'; +import { TPromise } from 'vs/base/common/winjs.base'; /** * To an event a function with one or zero parameters @@ -294,8 +295,8 @@ export function fromPromise(promise: Thenable): Event { return emitter.event; } -export function toPromise(event: Event): Promise { - return new Promise(complete => { +export function toPromise(event: Event): Thenable { + return new TPromise(complete => { const sub = event(e => { sub.dispose(); complete(e);