mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
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:
@@ -270,7 +270,7 @@ export class BackupComponent {
|
||||
});
|
||||
|
||||
// Set backup path list
|
||||
this.pathListBox = new ListBox([], '', this.contextViewService, this.clipboardService);
|
||||
this.pathListBox = new ListBox([], this.contextViewService, this.clipboardService);
|
||||
this.pathListBox.render(this.pathElement.nativeElement);
|
||||
|
||||
// Set backup path add/remove buttons
|
||||
@@ -916,4 +916,4 @@ export class BackupComponent {
|
||||
|
||||
return backupInfo;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -233,7 +233,7 @@ export class RestoreDialog extends Modal {
|
||||
inputContainer.div({ class: 'dialog-input' }, (inputCellContainer) => {
|
||||
// Get the bootstrap params and perform the bootstrap
|
||||
inputCellContainer.style('width', '100%');
|
||||
this._databaseDropdown = new Dropdown(inputCellContainer.getHTMLElement(), this._contextViewService, this._themeService,
|
||||
this._databaseDropdown = new Dropdown(inputCellContainer.getHTMLElement(), this._contextViewService,
|
||||
{
|
||||
strictSelection: false,
|
||||
ariaLabel: LocalizedStrings.TARGETDATABASE,
|
||||
@@ -919,4 +919,4 @@ export class RestoreDialog extends Modal {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ export default class DropDownComponent extends ComponentBase implements ICompone
|
||||
ariaLabel: '',
|
||||
actionLabel: ''
|
||||
};
|
||||
this._editableDropdown = new Dropdown(this._editableDropDownContainer.nativeElement, this.contextViewService, this.themeService,
|
||||
this._editableDropdown = new Dropdown(this._editableDropDownContainer.nativeElement, this.contextViewService,
|
||||
dropdownOptions);
|
||||
|
||||
this._register(this._editableDropdown);
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import {
|
||||
Component, Input, Inject, ChangeDetectorRef, forwardRef, ComponentFactoryResolver,
|
||||
ViewChild, ViewChildren, ElementRef, Injector, OnDestroy, QueryList, AfterViewInit
|
||||
Component, Input, Inject, ChangeDetectorRef, forwardRef,
|
||||
ViewChild, ElementRef, OnDestroy, AfterViewInit
|
||||
} from '@angular/core';
|
||||
|
||||
import * as azdata from 'azdata';
|
||||
@@ -17,8 +17,6 @@ import { ListBox } from 'sql/base/browser/ui/listBox/listBox';
|
||||
import { attachListBoxStyler } from 'sql/platform/theme/common/styler';
|
||||
import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService';
|
||||
import { IContextViewService } from 'vs/platform/contextview/browser/contextView';
|
||||
import { Emitter } from 'vs/base/common/event';
|
||||
import * as nls from 'vs/nls';
|
||||
import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService';
|
||||
|
||||
@Component({
|
||||
@@ -50,7 +48,7 @@ export default class ListBoxComponent extends ComponentBase implements IComponen
|
||||
|
||||
ngAfterViewInit(): void {
|
||||
if (this._inputContainer) {
|
||||
this._input = new ListBox([], undefined, this.contextViewService, this.clipboardService);
|
||||
this._input = new ListBox([], this.contextViewService, this.clipboardService);
|
||||
this._input.render(this._inputContainer.nativeElement);
|
||||
|
||||
this._register(this._input);
|
||||
|
||||
@@ -529,7 +529,7 @@ export class QueryEditor extends BaseEditor {
|
||||
*/
|
||||
public get listDatabasesActionItem(): ListDatabasesActionItem {
|
||||
if (!this._listDatabasesActionItem) {
|
||||
this._listDatabasesActionItem = this._instantiationService.createInstance(ListDatabasesActionItem, this, this._listDatabasesAction);
|
||||
this._listDatabasesActionItem = this._instantiationService.createInstance(ListDatabasesActionItem, this);
|
||||
this._register(this._listDatabasesActionItem.attachStyler(this.themeService));
|
||||
}
|
||||
return this._listDatabasesActionItem;
|
||||
|
||||
@@ -446,11 +446,9 @@ export class ListDatabasesActionItem extends EventEmitter implements IActionItem
|
||||
// CONSTRUCTOR /////////////////////////////////////////////////////////
|
||||
constructor(
|
||||
private _editor: QueryEditor,
|
||||
private _action: ListDatabasesAction,
|
||||
@IConnectionManagementService private _connectionManagementService: IConnectionManagementService,
|
||||
@INotificationService private _notificationService: INotificationService,
|
||||
@IContextViewService contextViewProvider: IContextViewService,
|
||||
@IThemeService themeService: IThemeService,
|
||||
@IConfigurationService private readonly _configurationService: IConfigurationService
|
||||
) {
|
||||
super();
|
||||
@@ -465,7 +463,7 @@ export class ListDatabasesActionItem extends EventEmitter implements IActionItem
|
||||
this._databaseSelectBox.disable();
|
||||
|
||||
} else {
|
||||
this._dropdown = new Dropdown(this.$databaseListDropdown.getHTMLElement(), contextViewProvider, themeService, {
|
||||
this._dropdown = new Dropdown(this.$databaseListDropdown.getHTMLElement(), contextViewProvider, {
|
||||
strictSelection: true,
|
||||
placeholder: this._selectDatabaseString,
|
||||
ariaLabel: this._selectDatabaseString,
|
||||
|
||||
Reference in New Issue
Block a user