Merge from vscode 52dcb723a39ae75bee1bd56b3312d7fcdc87aeed (#6719)

This commit is contained in:
Anthony Dresser
2019-08-12 21:31:51 -07:00
committed by GitHub
parent 00250839fc
commit 7eba8c4c03
616 changed files with 9472 additions and 7087 deletions

View File

@@ -64,11 +64,11 @@ export class Action extends Disposable implements IAction {
protected readonly _id: string;
protected _label: string;
protected _tooltip: string;
protected _tooltip: string | undefined;
protected _cssClass: string | undefined;
protected _enabled: boolean;
protected _checked: boolean;
protected _radio: boolean;
protected _enabled: boolean = true;
protected _checked: boolean = false;
protected _radio: boolean = false;
protected readonly _actionCallback?: (event?: any) => Promise<any>;
constructor(id: string, label: string = '', cssClass: string = '', enabled: boolean = true, actionCallback?: (event?: any) => Promise<any>) {
@@ -100,7 +100,7 @@ export class Action extends Disposable implements IAction {
}
get tooltip(): string {
return this._tooltip;
return this._tooltip || '';
}
set tooltip(value: string) {

View File

@@ -293,7 +293,7 @@ export class Color {
}
}
equals(other: Color): boolean {
equals(other: Color | null): boolean {
return !!other && RGBA.equals(this.rgba, other.rgba) && HSLA.equals(this.hsla, other.hsla) && HSVA.equals(this.hsva, other.hsva);
}
@@ -608,4 +608,4 @@ export namespace Color {
}
}
}
}
}

View File

@@ -645,7 +645,7 @@ export interface IWaitUntil {
export class AsyncEmitter<T extends IWaitUntil> extends Emitter<T> {
private _asyncDeliveryQueue: [Listener<T>, T, Promise<any>[]][];
private _asyncDeliveryQueue?: [Listener<T>, T, Promise<any>[]][];
async fireAsync(eventFn: (thenables: Promise<any>[], listener: Function) => T): Promise<void> {
if (!this._listeners) {

View File

@@ -7,9 +7,9 @@ import { INavigator, ArrayNavigator } from 'vs/base/common/iterator';
export class HistoryNavigator<T> implements INavigator<T> {
private _history: Set<T>;
private _history!: Set<T>;
private _limit: number;
private _navigator: ArrayNavigator<T>;
private _navigator!: ArrayNavigator<T>;
constructor(history: T[] = [], limit: number = 10) {
this._initialize(history);

View File

@@ -112,9 +112,9 @@ export class StringIterator implements IKeyIterator {
export class PathIterator implements IKeyIterator {
private _value: string;
private _from: number;
private _to: number;
private _value!: string;
private _from!: number;
private _to!: number;
reset(key: string): this {
this._value = key.replace(/\\$|\/$/, '');
@@ -176,9 +176,9 @@ export class PathIterator implements IKeyIterator {
}
class TernarySearchTreeNode<E> {
segment: string;
segment!: string;
value: E | undefined;
key: string;
key!: string;
left: TernarySearchTreeNode<E> | undefined;
mid: TernarySearchTreeNode<E> | undefined;
right: TernarySearchTreeNode<E> | undefined;

View File

@@ -58,6 +58,8 @@ class ErrorInvalidArgType extends Error {
msg += `. Received type ${typeof actual}`;
super(msg);
this.code = 'ERR_INVALID_ARG_TYPE';
}
}