strict null checks azure (#11928)

* strict null checks azure

* strict compilation

* Fix compilation issues

* Return empty arrays instead
This commit is contained in:
Amir Omidi
2020-08-25 18:12:47 -07:00
committed by GitHub
parent 8b52e7200c
commit 4659d727b7
24 changed files with 285 additions and 208 deletions

View File

@@ -570,7 +570,7 @@ export class ServerTreeView extends Disposable implements IServerTreeView {
/**
* Set whether the given element is expanded or collapsed
*/
public async setExpandedState(element: ServerTreeElement, expandedState: TreeItemCollapsibleState): Promise<void> {
public async setExpandedState(element: ServerTreeElement, expandedState?: TreeItemCollapsibleState): Promise<void> {
if (expandedState === TreeItemCollapsibleState.Collapsed) {
return this._tree.collapse(element);
} else if (expandedState === TreeItemCollapsibleState.Expanded) {
@@ -588,7 +588,7 @@ export class ServerTreeView extends Disposable implements IServerTreeView {
/**
* Select the given element in the tree and clear any other selections
*/
public async setSelected(element: ServerTreeElement, selected: boolean, clearOtherSelections: boolean): Promise<void> {
public async setSelected(element: ServerTreeElement, selected?: boolean, clearOtherSelections?: boolean): Promise<void> {
if (clearOtherSelections || (selected && clearOtherSelections !== false)) {
if (this._tree instanceof AsyncServerTree) {
this._tree.setSelection([]);