mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-26 01:25:38 -05:00
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:
@@ -8,7 +8,7 @@ import { Disposable } from 'vs/base/common/lifecycle';
|
||||
|
||||
export interface IConnectionProfileGroup {
|
||||
id: string;
|
||||
parentId: string;
|
||||
parentId?: string;
|
||||
name: string;
|
||||
color: string;
|
||||
description: string;
|
||||
@@ -18,7 +18,7 @@ export class ConnectionProfileGroup extends Disposable implements IConnectionPro
|
||||
|
||||
public children: ConnectionProfileGroup[];
|
||||
public connections: ConnectionProfile[];
|
||||
public parentId: string;
|
||||
public parentId?: string;
|
||||
private _isRenamed: boolean;
|
||||
public constructor(
|
||||
public name: string,
|
||||
@@ -53,8 +53,8 @@ export class ConnectionProfileGroup extends Disposable implements IConnectionPro
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public get fullName(): string {
|
||||
let fullName: string = (this.id === 'root') ? undefined : this.name;
|
||||
public get fullName(): string | undefined {
|
||||
let fullName: string | undefined = (this.id === 'root') ? undefined : this.name;
|
||||
if (this.parent) {
|
||||
let parentFullName = this.parent.fullName;
|
||||
if (parentFullName) {
|
||||
@@ -156,7 +156,7 @@ export class ConnectionProfileGroup extends Disposable implements IConnectionPro
|
||||
|
||||
public isAncestorOf(node: ConnectionProfileGroup | ConnectionProfile): boolean {
|
||||
let isAncestor = false;
|
||||
let currentNode = node;
|
||||
let currentNode: ConnectionProfileGroup | ConnectionProfile | undefined = node;
|
||||
while (currentNode) {
|
||||
if (currentNode.parent && currentNode.parent.id === this.id) {
|
||||
isAncestor = true;
|
||||
@@ -195,7 +195,7 @@ export class ConnectionProfileGroup extends Disposable implements IConnectionPro
|
||||
}
|
||||
|
||||
public static getConnectionsInGroup(group: ConnectionProfileGroup): ConnectionProfile[] {
|
||||
let connections = [];
|
||||
let connections: ConnectionProfile[] = [];
|
||||
if (group && group.connections) {
|
||||
group.connections.forEach((con) => connections.push(con));
|
||||
}
|
||||
@@ -208,7 +208,7 @@ export class ConnectionProfileGroup extends Disposable implements IConnectionPro
|
||||
}
|
||||
|
||||
public static getSubgroups(group: ConnectionProfileGroup): ConnectionProfileGroup[] {
|
||||
let subgroups = [];
|
||||
let subgroups: ConnectionProfileGroup[] = [];
|
||||
if (group && group.children) {
|
||||
group.children.forEach((grp) => subgroups.push(grp));
|
||||
group.children.forEach((subgroup) => {
|
||||
|
||||
Reference in New Issue
Block a user