Small strict null checking pass on a few files (#4293)

* fix some null checking

* fix various null strict checks

* move location fo sql files in json

* fix compile and more unused properties

* formatting

* small formatting changes

* readd types

* add comments for angular components

* formatting

* remove any decl
This commit is contained in:
Anthony Dresser
2019-03-14 18:18:32 -07:00
committed by GitHub
parent 0bf0e795ca
commit 4014c1d0ab
29 changed files with 881 additions and 1171 deletions

View File

@@ -106,7 +106,7 @@ export class AccountPicker extends Disposable {
addAccountAction.addAccountErrorEvent((msg) => this._addAccountErrorEmitter.fire(msg));
addAccountAction.addAccountStartEvent(() => this._addAccountStartEmitter.fire());
this._dropdown = this._register(new DropdownList(this._rootElement, option, this._listContainer, this._accountList, this._themeService, addAccountAction));
this._dropdown = this._register(new DropdownList(this._rootElement, option, this._listContainer, this._accountList, addAccountAction));
this._register(attachDropdownStyler(this._dropdown, this._themeService));
this._register(this._accountList.onSelectionChange((e: IListEvent<azdata.Account>) => {
if (e.elements.length === 1) {
@@ -235,4 +235,4 @@ export class AccountPicker extends Disposable {
this._refreshContainer.style.color = link;
}
}
}
}

View File

@@ -33,11 +33,20 @@ export function attachDropdownStyler(widget: IThemable, themeService: IThemeServ
backgroundColor?: cr.ColorIdentifier,
foregroundColor?: cr.ColorIdentifier,
borderColor?: cr.ColorIdentifier,
buttonForeground?: cr.ColorIdentifier,
buttonBackground?: cr.ColorIdentifier,
buttonHoverBackground?: cr.ColorIdentifier,
buttonFocusOutline?: cr.ColorIdentifier
}): IDisposable {
return attachStyler(themeService, {
foregroundColor: (style && style.foregroundColor) || cr.inputForeground,
borderColor: (style && style.borderColor) || cr.inputBorder,
backgroundColor: (style && style.backgroundColor) || cr.editorBackground
backgroundColor: (style && style.backgroundColor) || cr.editorBackground,
buttonForeground: (style && style.buttonForeground) || cr.buttonForeground,
buttonBackground: (style && style.buttonBackground) || cr.buttonBackground,
buttonHoverBackground: (style && style.buttonHoverBackground) || cr.buttonHoverBackground,
buttonBorder: cr.contrastBorder,
buttonFocusOutline: (style && style.buttonFocusOutline) || sqlcolors.buttonFocusOutline
}, widget);
}