mirror of
https://github.com/Microsoft/vscode
synced 2024-10-31 10:00:51 +00:00
workaround #56579
This commit is contained in:
parent
4390abed32
commit
eddf13fd7a
1 changed files with 3 additions and 2 deletions
|
@ -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<T =any>(promise: Thenable<T>): Event<T> {
|
|||
return emitter.event;
|
||||
}
|
||||
|
||||
export function toPromise<T>(event: Event<T>): Promise<T> {
|
||||
return new Promise(complete => {
|
||||
export function toPromise<T>(event: Event<T>): Thenable<T> {
|
||||
return new TPromise(complete => {
|
||||
const sub = event(e => {
|
||||
sub.dispose();
|
||||
complete(e);
|
||||
|
|
Loading…
Reference in a new issue