mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Update return types that can return undefined (#14660)
This commit is contained in:
@@ -161,13 +161,13 @@ export interface IConnectionManagementService {
|
|||||||
|
|
||||||
deleteConnectionGroup(group: ConnectionProfileGroup): Promise<boolean>;
|
deleteConnectionGroup(group: ConnectionProfileGroup): Promise<boolean>;
|
||||||
|
|
||||||
getAdvancedProperties(): azdata.ConnectionOption[];
|
getAdvancedProperties(): azdata.ConnectionOption[] | undefined;
|
||||||
|
|
||||||
getConnectionUri(connectionProfile: IConnectionProfile): string;
|
getConnectionUri(connectionProfile: IConnectionProfile): string;
|
||||||
|
|
||||||
getFormattedUri(uri: string, connectionProfile: IConnectionProfile): string;
|
getFormattedUri(uri: string, connectionProfile: IConnectionProfile): string;
|
||||||
|
|
||||||
getConnectionUriFromId(connectionId: string): string;
|
getConnectionUriFromId(connectionId: string): string | undefined;
|
||||||
|
|
||||||
isConnected(fileUri: string): boolean;
|
isConnected(fileUri: string): boolean;
|
||||||
|
|
||||||
@@ -193,7 +193,7 @@ export interface IConnectionManagementService {
|
|||||||
|
|
||||||
addSavedPassword(connectionProfile: IConnectionProfile): Promise<IConnectionProfile>;
|
addSavedPassword(connectionProfile: IConnectionProfile): Promise<IConnectionProfile>;
|
||||||
|
|
||||||
listDatabases(connectionUri: string): Thenable<azdata.ListDatabasesResult>;
|
listDatabases(connectionUri: string): Thenable<azdata.ListDatabasesResult | undefined>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register a connection provider
|
* Register a connection provider
|
||||||
@@ -204,11 +204,11 @@ export interface IConnectionManagementService {
|
|||||||
|
|
||||||
editGroup(group: ConnectionProfileGroup): Promise<void>;
|
editGroup(group: ConnectionProfileGroup): Promise<void>;
|
||||||
|
|
||||||
getConnectionProfile(fileUri: string): IConnectionProfile;
|
getConnectionProfile(fileUri: string): IConnectionProfile | undefined;
|
||||||
|
|
||||||
getConnectionInfo(fileUri: string): ConnectionManagementInfo;
|
getConnectionInfo(fileUri: string): ConnectionManagementInfo | undefined;
|
||||||
|
|
||||||
getDefaultProviderId(): string;
|
getDefaultProviderId(): string | undefined;
|
||||||
|
|
||||||
getUniqueConnectionProvidersByNameMap(providerNameToDisplayNameMap: { [providerDisplayName: string]: string }): { [providerDisplayName: string]: string };
|
getUniqueConnectionProvidersByNameMap(providerNameToDisplayNameMap: { [providerDisplayName: string]: string }): { [providerDisplayName: string]: string };
|
||||||
|
|
||||||
|
|||||||
@@ -1218,11 +1218,11 @@ export class ConnectionManagementService extends Disposable implements IConnecti
|
|||||||
return this._connectionStatusManager.isConnecting(fileUri);
|
return this._connectionStatusManager.isConnecting(fileUri);
|
||||||
}
|
}
|
||||||
|
|
||||||
public getConnectionProfile(fileUri: string): interfaces.IConnectionProfile {
|
public getConnectionProfile(fileUri: string): interfaces.IConnectionProfile | undefined {
|
||||||
return this._connectionStatusManager.isConnected(fileUri) ? this._connectionStatusManager.getConnectionProfile(fileUri) : undefined;
|
return this._connectionStatusManager.isConnected(fileUri) ? this._connectionStatusManager.getConnectionProfile(fileUri) : undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
public getConnectionInfo(fileUri: string): ConnectionManagementInfo {
|
public getConnectionInfo(fileUri: string): ConnectionManagementInfo | undefined {
|
||||||
return this._connectionStatusManager.isConnected(fileUri) ? this._connectionStatusManager.findConnection(fileUri) : undefined;
|
return this._connectionStatusManager.isConnected(fileUri) ? this._connectionStatusManager.findConnection(fileUri) : undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user