Add more areas to strict null (#7243)

* add more areas to strict null

* fix compile errors

* fix tests

* fix checks

* address PR comments
This commit is contained in:
Anthony Dresser
2019-09-18 12:27:19 -07:00
committed by GitHub
parent 373828d76f
commit aad9c0f965
35 changed files with 193 additions and 184 deletions

View File

@@ -10,6 +10,6 @@ import { FileNode } from 'sql/workbench/services/fileBrowser/common/fileNode';
*/
export class FileBrowserTree {
public rootNode: FileNode;
public selectedNode: FileNode;
public selectedNode?: FileNode;
public expandedNodes: FileNode[];
}

View File

@@ -33,7 +33,7 @@ export class FileNode {
/**
* Parent node
*/
public parent: FileNode;
public parent?: FileNode;
/**
* Children nodes
@@ -55,7 +55,7 @@ export class FileNode {
*/
public hasChildren: boolean;
constructor(id: string, name: string, fullPath: string, isFile: boolean, isExpanded: boolean, ownerUri: string, parent: FileNode) {
constructor(id: string, name: string, fullPath: string, isFile: boolean, isExpanded: boolean, ownerUri: string, parent?: FileNode) {
if (id) {
this.id = id;
} else {
@@ -69,4 +69,4 @@ export class FileNode {
this.isExpanded = isExpanded;
this.parent = parent;
}
}
}