mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Merge from vscode 011858832762aaff245b2336fb1c38166e7a10fb (#4663)
This commit is contained in:
@@ -178,7 +178,7 @@ export class Delayer<T> implements IDisposable {
|
||||
private timeout: any;
|
||||
private completionPromise: Promise<any> | null;
|
||||
private doResolve: ((value?: any | Promise<any>) => void) | null;
|
||||
private doReject: (err: any) => void;
|
||||
private doReject?: (err: any) => void;
|
||||
private task: ITask<T | Promise<T>> | null;
|
||||
|
||||
constructor(public defaultDelay: number) {
|
||||
@@ -222,7 +222,7 @@ export class Delayer<T> implements IDisposable {
|
||||
this.cancelTimeout();
|
||||
|
||||
if (this.completionPromise) {
|
||||
this.doReject(errors.canceled());
|
||||
this.doReject!(errors.canceled());
|
||||
this.completionPromise = null;
|
||||
}
|
||||
}
|
||||
@@ -282,7 +282,7 @@ export class Barrier {
|
||||
|
||||
private _isOpen: boolean;
|
||||
private _promise: Promise<boolean>;
|
||||
private _completePromise: (v: boolean) => void;
|
||||
private _completePromise!: (v: boolean) => void;
|
||||
|
||||
constructor() {
|
||||
this._isOpen = false;
|
||||
@@ -731,8 +731,8 @@ export class IdleValue<T> {
|
||||
private readonly _executor: () => void;
|
||||
private readonly _handle: IDisposable;
|
||||
|
||||
private _didRun: boolean;
|
||||
private _value: T;
|
||||
private _didRun: boolean = false;
|
||||
private _value?: T;
|
||||
private _error: any;
|
||||
|
||||
constructor(executor: () => T) {
|
||||
@@ -760,7 +760,7 @@ export class IdleValue<T> {
|
||||
if (this._error) {
|
||||
throw this._error;
|
||||
}
|
||||
return this._value;
|
||||
return this._value!;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user