mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-22 17:22:59 -05:00
Strict null scripting (#12126)
* strict null scripting * fix compile * fix tests * fix icon
This commit is contained in:
@@ -31,7 +31,7 @@ export class ConnectionViewletPanel extends ViewPane {
|
||||
|
||||
public static readonly ID = 'dataExplorer.servers';
|
||||
|
||||
private _root: HTMLElement;
|
||||
private _root?: HTMLElement;
|
||||
private _serverTreeView: ServerTreeView;
|
||||
private _addServerAction: IAction;
|
||||
private _addServerGroupAction: IAction;
|
||||
@@ -89,7 +89,7 @@ export class ConnectionViewletPanel extends ViewPane {
|
||||
|
||||
layoutBody(size: number): void {
|
||||
this._serverTreeView.layout(size);
|
||||
DOM.toggleClass(this._root, 'narrow', this._root.clientWidth < 300);
|
||||
DOM.toggleClass(this._root!, 'narrow', this._root!.clientWidth < 300);
|
||||
}
|
||||
|
||||
show(): void {
|
||||
|
||||
@@ -87,9 +87,9 @@ export class DataExplorerViewlet extends Viewlet {
|
||||
}
|
||||
|
||||
export class DataExplorerViewPaneContainer extends ViewPaneContainer {
|
||||
private root: HTMLElement;
|
||||
private root?: HTMLElement;
|
||||
|
||||
private dataSourcesBox: HTMLElement;
|
||||
private dataSourcesBox?: HTMLElement;
|
||||
|
||||
constructor(
|
||||
@IWorkbenchLayoutService layoutService: IWorkbenchLayoutService,
|
||||
@@ -125,7 +125,7 @@ export class DataExplorerViewPaneContainer extends ViewPaneContainer {
|
||||
}
|
||||
|
||||
layout(dimension: Dimension): void {
|
||||
toggleClass(this.root, 'narrow', dimension.width <= 300);
|
||||
toggleClass(this.root!, 'narrow', dimension.width <= 300);
|
||||
super.layout(new Dimension(dimension.width, dimension.height));
|
||||
}
|
||||
|
||||
@@ -135,7 +135,7 @@ export class DataExplorerViewPaneContainer extends ViewPaneContainer {
|
||||
|
||||
getSecondaryActions(): IAction[] {
|
||||
let menu = this.menuService.createMenu(MenuId.DataExplorerAction, this.contextKeyService);
|
||||
let actions = [];
|
||||
let actions: IAction[] = [];
|
||||
menu.getActions({}).forEach(group => {
|
||||
if (group[0] === 'secondary') {
|
||||
actions.push(...group[1]);
|
||||
|
||||
Reference in New Issue
Block a user