Add compile options to a few extensions (#8252)

* add compile options to a few extensions

* move dep to dev dep

* fix return types
This commit is contained in:
Anthony Dresser
2019-11-07 11:41:31 -08:00
committed by GitHub
parent b364e32beb
commit ef0a92d83f
68 changed files with 121 additions and 211 deletions

View File

@@ -3,7 +3,6 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
import * as nls from 'vscode-nls';
import * as vscode from 'vscode';
import * as azdata from 'azdata';
@@ -89,12 +88,13 @@ export class CmsUtils {
return this._cmsService;
}
public async getRegisteredServers(ownerUri: string, relativePath: string): Promise<mssql.ListRegisteredServersResult> {
public async getRegisteredServers(ownerUri: string, relativePath: string): Promise<mssql.ListRegisteredServersResult | undefined> {
const cmsService = await this.getCmsService();
const result = await cmsService.getRegisteredServers(ownerUri, relativePath);
if (result && result.registeredServersList && result.registeredServersList) {
return result;
}
return undefined;
}
public async createCmsServer(connection: azdata.connection.Connection,
@@ -166,7 +166,7 @@ export class CmsUtils {
}
public async addRegisteredServer(relativePath: string, ownerUri: string,
parentServerName?: string): Promise<boolean> {
parentServerName?: string): Promise<boolean | undefined> {
let provider = await this.getCmsService();
// Initial profile to disallow SQL Login without
// changing provider.
@@ -200,6 +200,7 @@ export class CmsUtils {
return result;
}
}
return undefined;
}
public async removeRegisteredServer(registeredServerName: string, relativePath: string, ownerUri: string): Promise<boolean> {
@@ -232,7 +233,7 @@ export class CmsUtils {
return this._credentialProvider;
}
public async makeConnection(initialConnectionProfile?: azdata.IConnectionProfile): Promise<azdata.connection.Connection> {
public async makeConnection(initialConnectionProfile?: azdata.IConnectionProfile): Promise<azdata.connection.Connection | undefined> {
if (!initialConnectionProfile) {
initialConnectionProfile = {
connectionName: undefined,
@@ -261,6 +262,7 @@ export class CmsUtils {
}
return connection;
}
return undefined;
}
// Static Functions