Update return types that can return undefined (#14660)

This commit is contained in:
Charles Gagnon
2021-03-11 10:09:50 -08:00
committed by GitHub
parent 6c877a4e20
commit cf862854c5
2 changed files with 8 additions and 8 deletions

View File

@@ -1218,11 +1218,11 @@ export class ConnectionManagementService extends Disposable implements IConnecti
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;
}
public getConnectionInfo(fileUri: string): ConnectionManagementInfo {
public getConnectionInfo(fileUri: string): ConnectionManagementInfo | undefined {
return this._connectionStatusManager.isConnected(fileUri) ? this._connectionStatusManager.findConnection(fileUri) : undefined;
}