Update to use TS 4.1 for building VS Code

This commit is contained in:
Matt Bierner
2020-09-16 11:48:21 -07:00
parent d1b49cd8b9
commit 50cc1d0e97
22 changed files with 35 additions and 35 deletions

View File

@@ -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);
}
}
}