mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-06 01:25:38 -05:00
Renable Strict TSLint (#5018)
* removes more builder references * remove builder from profiler * formatting * fix profiler dailog * remove builder from oatuhdialog * remove the rest of builder references * formatting * add more strict null checks to base * enable strict tslint rules * fix formatting * fix compile error * fix the rest of the hygeny issues and add pipeline step * fix pipeline files
This commit is contained in:
@@ -41,7 +41,7 @@ export class RefreshAction extends Action {
|
||||
this._tree = tree;
|
||||
}
|
||||
public run(): Promise<boolean> {
|
||||
var treeNode: TreeNode;
|
||||
let treeNode: TreeNode;
|
||||
if (this.element instanceof ConnectionProfile) {
|
||||
let connection: ConnectionProfile = this.element;
|
||||
if (this._connectionManagementService.isConnected(undefined, connection)) {
|
||||
|
||||
@@ -183,10 +183,10 @@ export class OEScriptSelectAction extends ScriptSelectAction {
|
||||
this._objectExplorerTreeNode = await getTreeNode(actionContext, this._objectExplorerService);
|
||||
}
|
||||
this._treeSelectionHandler.onTreeActionStateChange(true);
|
||||
var connectionProfile = TreeUpdateUtils.getConnectionProfile(this._objectExplorerTreeNode);
|
||||
var ownerUri = this._connectionManagementService.getConnectionUri(connectionProfile);
|
||||
let connectionProfile = TreeUpdateUtils.getConnectionProfile(this._objectExplorerTreeNode);
|
||||
let ownerUri = this._connectionManagementService.getConnectionUri(connectionProfile);
|
||||
ownerUri = this._connectionManagementService.getFormattedUri(ownerUri, connectionProfile);
|
||||
var metadata = this._objectExplorerTreeNode.metadata;
|
||||
let metadata = this._objectExplorerTreeNode.metadata;
|
||||
|
||||
return super.run({ profile: connectionProfile, object: metadata }).then((result) => {
|
||||
this._treeSelectionHandler.onTreeActionStateChange(false);
|
||||
@@ -218,8 +218,8 @@ export class OEEditDataAction extends EditDataAction {
|
||||
this._objectExplorerTreeNode = await getTreeNode(actionContext, this._objectExplorerService);
|
||||
}
|
||||
this._treeSelectionHandler.onTreeActionStateChange(true);
|
||||
var connectionProfile = TreeUpdateUtils.getConnectionProfile(<TreeNode>this._objectExplorerTreeNode);
|
||||
var metadata = (<TreeNode>this._objectExplorerTreeNode).metadata;
|
||||
let connectionProfile = TreeUpdateUtils.getConnectionProfile(<TreeNode>this._objectExplorerTreeNode);
|
||||
let metadata = (<TreeNode>this._objectExplorerTreeNode).metadata;
|
||||
|
||||
return super.run({ profile: connectionProfile, object: metadata }).then((result) => {
|
||||
this._treeSelectionHandler.onTreeActionStateChange(false);
|
||||
@@ -252,9 +252,9 @@ export class OEScriptCreateAction extends ScriptCreateAction {
|
||||
this._objectExplorerTreeNode = await getTreeNode(actionContext, this._objectExplorerService);
|
||||
}
|
||||
this._treeSelectionHandler.onTreeActionStateChange(true);
|
||||
var connectionProfile = TreeUpdateUtils.getConnectionProfile(<TreeNode>this._objectExplorerTreeNode);
|
||||
var metadata = (<TreeNode>this._objectExplorerTreeNode).metadata;
|
||||
var ownerUri = this._connectionManagementService.getConnectionUri(connectionProfile);
|
||||
let connectionProfile = TreeUpdateUtils.getConnectionProfile(<TreeNode>this._objectExplorerTreeNode);
|
||||
let metadata = (<TreeNode>this._objectExplorerTreeNode).metadata;
|
||||
let ownerUri = this._connectionManagementService.getConnectionUri(connectionProfile);
|
||||
ownerUri = this._connectionManagementService.getFormattedUri(ownerUri, connectionProfile);
|
||||
|
||||
return super.run({ profile: connectionProfile, object: metadata }).then((result) => {
|
||||
@@ -288,9 +288,9 @@ export class OEScriptExecuteAction extends ScriptExecuteAction {
|
||||
this._objectExplorerTreeNode = await getTreeNode(actionContext, this._objectExplorerService);
|
||||
}
|
||||
this._treeSelectionHandler.onTreeActionStateChange(true);
|
||||
var connectionProfile = TreeUpdateUtils.getConnectionProfile(<TreeNode>this._objectExplorerTreeNode);
|
||||
var metadata = (<TreeNode>this._objectExplorerTreeNode).metadata;
|
||||
var ownerUri = this._connectionManagementService.getConnectionUri(connectionProfile);
|
||||
let connectionProfile = TreeUpdateUtils.getConnectionProfile(<TreeNode>this._objectExplorerTreeNode);
|
||||
let metadata = (<TreeNode>this._objectExplorerTreeNode).metadata;
|
||||
let ownerUri = this._connectionManagementService.getConnectionUri(connectionProfile);
|
||||
ownerUri = this._connectionManagementService.getFormattedUri(ownerUri, connectionProfile);
|
||||
|
||||
return super.run({ profile: connectionProfile, object: metadata }).then((result) => {
|
||||
@@ -324,9 +324,9 @@ export class OEScriptAlterAction extends ScriptAlterAction {
|
||||
this._objectExplorerTreeNode = await getTreeNode(actionContext, this._objectExplorerService);
|
||||
}
|
||||
this._treeSelectionHandler.onTreeActionStateChange(true);
|
||||
var connectionProfile = TreeUpdateUtils.getConnectionProfile(<TreeNode>this._objectExplorerTreeNode);
|
||||
var metadata = (<TreeNode>this._objectExplorerTreeNode).metadata;
|
||||
var ownerUri = this._connectionManagementService.getConnectionUri(connectionProfile);
|
||||
let connectionProfile = TreeUpdateUtils.getConnectionProfile(<TreeNode>this._objectExplorerTreeNode);
|
||||
let metadata = (<TreeNode>this._objectExplorerTreeNode).metadata;
|
||||
let ownerUri = this._connectionManagementService.getConnectionUri(connectionProfile);
|
||||
ownerUri = this._connectionManagementService.getFormattedUri(ownerUri, connectionProfile);
|
||||
|
||||
return super.run({ profile: connectionProfile, object: metadata }).then((result) => {
|
||||
@@ -360,9 +360,9 @@ export class OEScriptDeleteAction extends ScriptDeleteAction {
|
||||
this._objectExplorerTreeNode = await getTreeNode(actionContext, this._objectExplorerService);
|
||||
}
|
||||
this._treeSelectionHandler.onTreeActionStateChange(true);
|
||||
var connectionProfile = TreeUpdateUtils.getConnectionProfile(<TreeNode>this._objectExplorerTreeNode);
|
||||
var metadata = (<TreeNode>this._objectExplorerTreeNode).metadata;
|
||||
var ownerUri = this._connectionManagementService.getConnectionUri(connectionProfile);
|
||||
let connectionProfile = TreeUpdateUtils.getConnectionProfile(<TreeNode>this._objectExplorerTreeNode);
|
||||
let metadata = (<TreeNode>this._objectExplorerTreeNode).metadata;
|
||||
let ownerUri = this._connectionManagementService.getConnectionUri(connectionProfile);
|
||||
ownerUri = this._connectionManagementService.getFormattedUri(ownerUri, connectionProfile);
|
||||
|
||||
return super.run({ profile: connectionProfile, object: metadata }).then((result) => {
|
||||
@@ -410,4 +410,3 @@ export class ObjectExplorerActionUtilities {
|
||||
return scriptMap;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ export class ServerTreeController extends treedefaults.DefaultController {
|
||||
|
||||
tree.setFocus(element);
|
||||
|
||||
var actionContext: any;
|
||||
let actionContext: any;
|
||||
if (element instanceof TreeNode) {
|
||||
let context = new ObjectExplorerActionsContext();
|
||||
context.nodeInfo = element.toNodeInfo();
|
||||
@@ -103,4 +103,4 @@ export class ServerTreeController extends treedefaults.DefaultController {
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ export class ServerTreeDataSource implements IDataSource {
|
||||
} else if (element instanceof ConnectionProfileGroup) {
|
||||
resolve((<ConnectionProfileGroup>element).getChildren());
|
||||
} else if (element instanceof TreeNode) {
|
||||
var node = element;
|
||||
let node = element;
|
||||
if (node.children) {
|
||||
resolve(node.children);
|
||||
} else {
|
||||
|
||||
@@ -69,12 +69,6 @@ export class TreeSelectionHandler {
|
||||
|
||||
/**
|
||||
*
|
||||
* @param connectionManagementService
|
||||
* @param objectExplorerService
|
||||
* @param isDoubleClick
|
||||
* @param isKeyboard
|
||||
* @param selection
|
||||
* @param tree
|
||||
* @param connectionCompleteCallback A function that gets called after a connection is established due to the selection, if needed
|
||||
*/
|
||||
private handleTreeItemSelected(connectionManagementService: IConnectionManagementService, objectExplorerService: IObjectExplorerService, isDoubleClick: boolean, isKeyboard: boolean, selection: any[], tree: ITree, connectionCompleteCallback: () => void): void {
|
||||
@@ -117,4 +111,4 @@ export class TreeSelectionHandler {
|
||||
tree.toggleExpansion(selection[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { ConnectionProfile } from 'sql/platform/connection/common/connectionProfile';
|
||||
import { NodeType, SqlThemeIcon } from 'sql/workbench/parts/objectExplorer/common/nodeType';
|
||||
@@ -107,7 +107,7 @@ export class TreeNode {
|
||||
this.nodeStatus = nodeStatus;
|
||||
}
|
||||
public getConnectionProfile(): ConnectionProfile {
|
||||
var currentNode: TreeNode = this;
|
||||
let currentNode: TreeNode = this;
|
||||
while (!currentNode.connection && currentNode.parent) {
|
||||
currentNode = currentNode.parent;
|
||||
}
|
||||
@@ -118,7 +118,7 @@ export class TreeNode {
|
||||
if (this.connection) {
|
||||
return undefined;
|
||||
}
|
||||
var currentNode: TreeNode = this;
|
||||
let currentNode: TreeNode = this;
|
||||
while (currentNode.nodeTypeId !== NodeType.Database && currentNode.nodeTypeId !== NodeType.Server && currentNode.parent) {
|
||||
currentNode = currentNode.parent;
|
||||
}
|
||||
@@ -130,7 +130,7 @@ export class TreeNode {
|
||||
}
|
||||
|
||||
public getSession(): azdata.ObjectExplorerSession {
|
||||
var currentNode: TreeNode = this;
|
||||
let currentNode: TreeNode = this;
|
||||
while (!currentNode.session && currentNode.parent) {
|
||||
currentNode = currentNode.parent;
|
||||
}
|
||||
@@ -172,4 +172,4 @@ export class TreeNode {
|
||||
public setSelected(selected: boolean, clearOtherSelections?: boolean): Thenable<void> {
|
||||
return this._objectExplorerCallbacks.setNodeSelected(this, selected, clearOtherSelections);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user