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,8 +3,6 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
import * as azdata from 'azdata';
import { promises as fs } from 'fs';
@@ -28,7 +26,7 @@ export class AgentUtils {
return AgentUtils._agentService;
}
public static async getDatabases(ownerUri: string): Promise<string[]> {
public static async getDatabases(ownerUri: string): Promise<string[] | undefined> {
if (!AgentUtils._connectionService) {
let currentConnection = await azdata.connection.getCurrentConnection();
this._connectionService = azdata.dataprotocol.getProvider<azdata.ConnectionProvider>(currentConnection.providerId, azdata.DataProviderType.ConnectionProvider);
@@ -37,6 +35,7 @@ export class AgentUtils {
if (result && result.databaseNames && result.databaseNames.length > 0) {
return result.databaseNames;
}
return undefined;
});
}