mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-22 01:25:38 -05:00
Add more areas to strict null (#7243)
* add more areas to strict null * fix compile errors * fix tests * fix checks * address PR comments
This commit is contained in:
@@ -19,7 +19,7 @@ export const IBackupService = createDecorator<IBackupService>(SERVICE_ID);
|
||||
export interface IBackupService {
|
||||
_serviceBrand: undefined;
|
||||
|
||||
getBackupConfigInfo(connectionUri: string): Thenable<azdata.BackupConfigInfo>;
|
||||
getBackupConfigInfo(connectionUri: string): Promise<azdata.BackupConfigInfo | undefined>;
|
||||
|
||||
/**
|
||||
* Backup a data source using the provided connection
|
||||
|
||||
@@ -27,12 +27,12 @@ export class BackupService implements IBackupService {
|
||||
/**
|
||||
* Get database metadata needed to populate backup UI
|
||||
*/
|
||||
public getBackupConfigInfo(connectionUri: string): Thenable<azdata.BackupConfigInfo> {
|
||||
public getBackupConfigInfo(connectionUri: string): Promise<azdata.BackupConfigInfo | undefined> {
|
||||
let providerId: string = this._connectionService.getProviderIdFromUri(connectionUri);
|
||||
if (providerId) {
|
||||
let provider = this._providers[providerId];
|
||||
if (provider) {
|
||||
return provider.getBackupConfigInfo(connectionUri);
|
||||
return Promise.resolve(provider.getBackupConfigInfo(connectionUri));
|
||||
}
|
||||
}
|
||||
return Promise.resolve(undefined);
|
||||
@@ -57,7 +57,7 @@ export class BackupService implements IBackupService {
|
||||
});
|
||||
}
|
||||
|
||||
private getProvider(connectionUri: string): { provider: azdata.BackupProvider, providerName: string } {
|
||||
private getProvider(connectionUri: string): { provider: azdata.BackupProvider, providerName: string } | undefined {
|
||||
let providerId: string = this._connectionService.getProviderIdFromUri(connectionUri);
|
||||
if (providerId) {
|
||||
return { provider: this._providers[providerId], providerName: providerId };
|
||||
|
||||
Reference in New Issue
Block a user