mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 20:13:32 +01:00
Update to use TS 4.1 for building VS Code
This commit is contained in:
@@ -105,7 +105,7 @@ export class Delayer<T> {
|
||||
public defaultDelay: number;
|
||||
private timeout: NodeJS.Timer | null;
|
||||
private completionPromise: Promise<T> | null;
|
||||
private onResolve: ((value: T | Thenable<T> | undefined) => void) | null;
|
||||
private onResolve: ((value: T | PromiseLike<T> | undefined) => void) | null;
|
||||
private task: ITask<T> | null;
|
||||
|
||||
constructor(defaultDelay: number) {
|
||||
@@ -121,7 +121,7 @@ export class Delayer<T> {
|
||||
this.cancelTimeout();
|
||||
|
||||
if (!this.completionPromise) {
|
||||
this.completionPromise = new Promise<T>((resolve) => {
|
||||
this.completionPromise = new Promise<T | undefined>((resolve) => {
|
||||
this.onResolve = resolve;
|
||||
}).then(() => {
|
||||
this.completionPromise = null;
|
||||
@@ -182,4 +182,4 @@ export class ThrottledDelayer<T> extends Delayer<Promise<T>> {
|
||||
public trigger(promiseFactory: ITask<Promise<T>>, delay?: number): Promise<Promise<T>> {
|
||||
return super.trigger(() => this.throttler.queue(promiseFactory), delay);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user